scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -149,6 +170,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.
*
@@ -156,9 +190,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;
}
@@ -175,21 +211,12 @@ public NotificationHubsManager authenticate(TokenCredential credential, AzurePro
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
- userAgentBuilder
- .append("azsdk-java")
- .append("-")
- .append("com.azure.resourcemanager.notificationhubs")
- .append("/")
- .append("1.0.0-beta.3");
+ userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.notificationhubs")
+ .append("/").append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
- userAgentBuilder
- .append(" (")
- .append(Configuration.getGlobalConfiguration().get("java.version"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.name"))
- .append("; ")
- .append(Configuration.getGlobalConfiguration().get("os.version"))
- .append("; auto-generated)");
+ userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}
@@ -198,49 +225,50 @@ public NotificationHubsManager authenticate(TokenCredential credential, AzurePro
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()));
+ 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
- .addAll(
- this
- .policies
- .stream()
- .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
- .collect(Collectors.toList()));
+ 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 =
- new HttpPipelineBuilder()
- .httpClient(httpClient)
- .policies(policies.toArray(new HttpPipelinePolicy[0]))
- .build();
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0])).build();
return new NotificationHubsManager(httpPipeline, profile, defaultPollInterval);
}
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /**
+ * Gets the resource collection API of NotificationHubs. It manages NotificationHubResource,
+ * SharedAccessAuthorizationRuleResource.
+ *
+ * @return Resource collection API of NotificationHubs.
+ */
+ public NotificationHubs notificationHubs() {
+ if (this.notificationHubs == null) {
+ this.notificationHubs = new NotificationHubsImpl(clientObject.getNotificationHubs(), this);
}
- return operations;
+ return notificationHubs;
}
- /** @return Resource collection API of Namespaces. */
+ /**
+ * Gets the resource collection API of Namespaces. It manages NamespaceResource.
+ *
+ * @return Resource collection API of Namespaces.
+ */
public Namespaces namespaces() {
if (this.namespaces == null) {
this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this);
@@ -248,19 +276,38 @@ public Namespaces namespaces() {
return namespaces;
}
- /** @return Resource collection API of NotificationHubs. */
- public NotificationHubs notificationHubs() {
- if (this.notificationHubs == null) {
- this.notificationHubs = new NotificationHubsImpl(clientObject.getNotificationHubs(), this);
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
}
- return notificationHubs;
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections
+ = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
}
/**
- * @return Wrapped service client NotificationHubsManagementClient providing direct access to the underlying
- * auto-generated API implementation, based on Azure REST API.
+ * Gets wrapped service client NotificationHubsRPClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client NotificationHubsRPClient.
*/
- public NotificationHubsManagementClient serviceClient() {
+ public NotificationHubsRPClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NamespacesClient.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NamespacesClient.java
index 72ea0544d1c3..2c275f1c4cfd 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NamespacesClient.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NamespacesClient.java
@@ -13,371 +13,388 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.notificationhubs.fluent.models.CheckAvailabilityResultInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.NamespaceResourceInner;
+import com.azure.resourcemanager.notificationhubs.fluent.models.PnsCredentialsResourceInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.ResourceListKeysInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.SharedAccessAuthorizationRuleResourceInner;
import com.azure.resourcemanager.notificationhubs.models.CheckAvailabilityParameters;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceCreateOrUpdateParameters;
import com.azure.resourcemanager.notificationhubs.models.NamespacePatchParameters;
-import com.azure.resourcemanager.notificationhubs.models.PolicykeyResource;
-import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters;
+import com.azure.resourcemanager.notificationhubs.models.PolicyKeyResource;
-/** An instance of this class provides access to all the operations defined in NamespacesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in NamespacesClient.
+ */
public interface NamespacesClient {
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
+ *
+ * @param parameters Request content.
+ * @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameters parameters);
+ Response checkAvailabilityWithResponse(CheckAvailabilityParameters parameters,
+ Context context);
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
- * @param context The context to associate with this operation.
+ *
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response checkAvailabilityWithResponse(
- CheckAvailabilityParameters parameters, Context context);
+ CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameters parameters);
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NamespaceResourceInner createOrUpdate(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String namespaceName,
+ Context context);
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
- * @param context The context to associate with this operation.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context);
+ NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName);
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return the {@link SyncPoller} for polling of notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- NamespaceResourceInner patch(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NamespaceResourceInner> beginCreateOrUpdate(String resourceGroupName,
+ String namespaceName, NamespaceResourceInner parameters);
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return the {@link SyncPoller} for polling of notification Hubs Namespace Resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, NamespaceResourceInner> beginCreateOrUpdate(String resourceGroupName,
+ String namespaceName, NamespaceResourceInner parameters, Context context);
+
+ /**
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 notification Hubs Namespace Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response patchWithResponse(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters, Context context);
+ NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters);
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 completion.
+ * @return notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters, Context context);
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 completion.
+ * @return notification Hubs Namespace Resource along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String namespaceName,
+ NamespacePatchParameters parameters, Context context);
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String namespaceName);
+ NamespaceResourceInner update(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters);
/**
* Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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)
- void delete(String resourceGroupName, String namespaceName, Context context);
+ Response deleteWithResponse(String resourceGroupName, String namespaceName, Context context);
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName);
+ void delete(String resourceGroupName, String namespaceName);
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * Lists all the available namespaces within the subscription.
+ *
* @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 description of a Namespace resource.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String namespaceName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
+ * @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String skipToken, Integer top, Context context);
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
- * @param context The context to associate with this operation.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateAuthorizationRuleWithResponse(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
+ * @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 response of the List Namespace operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Integer top,
+ Context context);
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Creates an authorization rule for a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 response.
+ * @return response for POST requests that return single SharedAccessAuthorizationRule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteAuthorizationRuleWithResponse(
- String resourceGroupName, String namespaceName, String authorizationRuleName, Context context);
+ Response createOrUpdateAuthorizationRuleWithResponse(
+ String resourceGroupName, String namespaceName, String authorizationRuleName,
+ SharedAccessAuthorizationRuleResourceInner parameters, Context context);
/**
- * Gets an authorization rule for a namespace by name.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization rule name.
+ * Creates an authorization rule for a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 authorization rule for a namespace by name.
+ * @return response for POST requests that return single SharedAccessAuthorizationRule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(
- String resourceGroupName, String namespaceName, String authorizationRuleName);
+ SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName,
+ String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleResourceInner parameters);
/**
- * Gets an authorization rule for a namespace by name.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization rule name.
+ * Deletes a namespace authorization rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 authorization rule for a namespace by name.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getAuthorizationRuleWithResponse(
- String resourceGroupName, String namespaceName, String authorizationRuleName, Context context);
+ Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName,
+ String authorizationRuleName, Context context);
/**
- * Lists the available namespaces within a resourceGroup.
- *
- * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all
- * the namespaces within subscription.
+ * Deletes a namespace authorization rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 of the List Namespace operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName);
/**
- * Lists the available namespaces within a resourceGroup.
- *
- * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all
- * the namespaces within subscription.
+ * Gets an authorization rule for a namespace by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 response of the List Namespace operation.
+ * @return an authorization rule for a namespace by name along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getAuthorizationRuleWithResponse(String resourceGroupName,
+ String namespaceName, String authorizationRuleName, Context context);
/**
- * Lists all the available namespaces within the subscription irrespective of the resourceGroups.
- *
+ * Gets an authorization rule for a namespace by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @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 of the List Namespace operation.
+ * @return an authorization rule for a namespace by name.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(String resourceGroupName, String namespaceName,
+ String authorizationRuleName);
/**
- * Lists all the available namespaces within the subscription irrespective of the resourceGroups.
- *
- * @param context The context to associate with this operation.
+ * Gets the authorization rules for a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 of the List Namespace operation.
+ * @return the authorization rules for a namespace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ PagedIterable listAuthorizationRules(String resourceGroupName,
+ String namespaceName);
/**
* Gets the authorization rules for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 authorization rules for a namespace.
+ * @return the authorization rules for a namespace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAuthorizationRules(
- String resourceGroupName, String namespaceName);
+ PagedIterable listAuthorizationRules(String resourceGroupName,
+ String namespaceName, Context context);
/**
- * Gets the authorization rules for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Gets the Primary and Secondary ConnectionStrings to the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 authorization rules for a namespace.
+ * @return the Primary and Secondary ConnectionStrings to the namespace along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAuthorizationRules(
- String resourceGroupName, String namespaceName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listKeysWithResponse(String resourceGroupName, String namespaceName,
+ String authorizationRuleName, Context context);
/**
* Gets the Primary and Secondary ConnectionStrings to the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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.
@@ -387,55 +404,64 @@ PagedIterable listAuthorizationRules
ResourceListKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName);
/**
- * Gets the Primary and Secondary ConnectionStrings to the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule.
+ * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 Primary and Secondary ConnectionStrings to the namespace.
+ * @return response for the POST request that returns Namespace or NotificationHub access keys (connection strings)
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listKeysWithResponse(
- String resourceGroupName, String namespaceName, String authorizationRuleName, Context context);
+ Response regenerateKeysWithResponse(String resourceGroupName, String namespaceName,
+ String authorizationRuleName, PolicyKeyResource parameters, Context context);
/**
* Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule.
- * @param parameters Parameters supplied to regenerate the Namespace Authorization Rule Key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 namespace/NotificationHub Connection String.
+ * @return response for the POST request that returns Namespace or NotificationHub access keys (connection strings).
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ResourceListKeysInner regenerateKeys(
- String resourceGroupName, String namespaceName, String authorizationRuleName, PolicykeyResource parameters);
+ ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName,
+ PolicyKeyResource parameters);
/**
- * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule.
- * @param parameters Parameters supplied to regenerate the Namespace Authorization Rule Key.
+ * Lists the PNS credentials associated with a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 namespace/NotificationHub Connection String.
+ * @return description of a NotificationHub PNS Credentials along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regenerateKeysWithResponse(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- PolicykeyResource parameters,
+ Response getPnsCredentialsWithResponse(String resourceGroupName, String namespaceName,
Context context);
+
+ /**
+ * Lists the PNS credentials associated with a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 description of a NotificationHub PNS Credentials.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PnsCredentialsResourceInner getPnsCredentials(String resourceGroupName, String namespaceName);
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsClient.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsClient.java
index b439c9399d94..f88f06ea4740 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsClient.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsClient.java
@@ -16,493 +16,459 @@
import com.azure.resourcemanager.notificationhubs.fluent.models.ResourceListKeysInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.SharedAccessAuthorizationRuleResourceInner;
import com.azure.resourcemanager.notificationhubs.models.CheckAvailabilityParameters;
-import com.azure.resourcemanager.notificationhubs.models.NotificationHubCreateOrUpdateParameters;
import com.azure.resourcemanager.notificationhubs.models.NotificationHubPatchParameters;
-import com.azure.resourcemanager.notificationhubs.models.PolicykeyResource;
-import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters;
+import com.azure.resourcemanager.notificationhubs.models.PolicyKeyResource;
-/** An instance of this class provides access to all the operations defined in NotificationHubsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in NotificationHubsClient.
+ */
public interface NotificationHubsClient {
/**
* Checks the availability of the given notificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters The notificationHub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- CheckAvailabilityResultInner checkNotificationHubAvailability(
- String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters);
+ Response checkNotificationHubAvailabilityWithResponse(String resourceGroupName,
+ String namespaceName, CheckAvailabilityParameters parameters, Context context);
/**
* Checks the availability of the given notificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters The notificationHub name.
- * @param context The context to associate with this operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response checkNotificationHubAvailabilityWithResponse(
- String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters, Context context);
+ CheckAvailabilityResultInner checkNotificationHubAvailability(String resourceGroupName, String namespaceName,
+ CheckAvailabilityParameters parameters);
/**
- * Creates/Update a NotificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param parameters Parameters supplied to the create/update a NotificationHub Resource.
+ * Gets the notification hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @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 description of a NotificationHub Resource.
+ * @return the notification hub along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, Context context);
+
+ /**
+ * Gets the notification hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @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 notification hub.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NotificationHubResourceInner createOrUpdate(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- NotificationHubCreateOrUpdateParameters parameters);
+ NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName);
/**
* Creates/Update a NotificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param parameters Parameters supplied to the create/update a NotificationHub Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param parameters Request content.
* @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 description of a NotificationHub Resource.
+ * @return notification Hub Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- NotificationHubCreateOrUpdateParameters parameters,
- Context context);
+ Response createOrUpdateWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, NotificationHubResourceInner parameters, Context context);
/**
- * Patch a NotificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Creates/Update a NotificationHub in a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param parameters Request content.
* @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 description of a NotificationHub Resource.
+ * @return notification Hub Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NotificationHubResourceInner patch(String resourceGroupName, String namespaceName, String notificationHubName);
+ NotificationHubResourceInner createOrUpdate(String resourceGroupName, String namespaceName,
+ String notificationHubName, NotificationHubResourceInner parameters);
/**
* Patch a NotificationHub in a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param parameters Parameters supplied to patch a NotificationHub Resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param parameters Request content.
* @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 description of a NotificationHub Resource.
+ * @return notification Hub Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response patchWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- NotificationHubPatchParameters parameters,
- Context context);
+ Response updateWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, NotificationHubPatchParameters parameters, Context context);
/**
- * Deletes a notification hub associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Patch a NotificationHub in a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param parameters Request content.
* @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 notification Hub Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String namespaceName, String notificationHubName);
+ NotificationHubResourceInner update(String resourceGroupName, String namespaceName, String notificationHubName,
+ NotificationHubPatchParameters parameters);
/**
* Deletes a notification hub associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteWithResponse(
- String resourceGroupName, String namespaceName, String notificationHubName, Context context);
+ Response deleteWithResponse(String resourceGroupName, String namespaceName, String notificationHubName,
+ Context context);
/**
- * Lists the notification hubs associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Deletes a notification hub associated with a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 description of a NotificationHub Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName);
+ void delete(String resourceGroupName, String namespaceName, String notificationHubName);
/**
* Lists the notification hubs associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param context The context to associate with this operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a NotificationHub Resource.
+ * @return the response of the List NotificationHub operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String namespaceName, String notificationHubName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String namespaceName);
/**
- * test send a push notification.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Lists the notification hubs associated with a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param skipToken Continuation token.
+ * @param top Page size.
+ * @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 description of a NotificationHub Resource.
+ * @return the response of the List NotificationHub operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- DebugSendResponseInner debugSend(String resourceGroupName, String namespaceName, String notificationHubName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String namespaceName, String skipToken,
+ Integer top, Context context);
/**
- * test send a push notification.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param parameters Debug send parameters.
+ * Test send a push notification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 description of a NotificationHub Resource.
+ * @return description of a NotificationHub Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response debugSendWithResponse(
- String resourceGroupName, String namespaceName, String notificationHubName, Object parameters, Context context);
+ Response debugSendWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, Context context);
/**
- * Creates/Updates an authorization rule for a NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Test send a push notification.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 description of a Namespace AuthorizationRules.
+ * @return description of a NotificationHub Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters);
+ DebugSendResponseInner debugSend(String resourceGroupName, String namespaceName, String notificationHubName);
/**
* Creates/Updates an authorization rule for a NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * @param parameters Request content.
* @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 description of a Namespace AuthorizationRules.
+ * @return response for POST requests that return single SharedAccessAuthorizationRule along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateAuthorizationRuleWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
- Context context);
+ String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName,
+ SharedAccessAuthorizationRuleResourceInner parameters, Context context);
/**
- * Deletes a notificationHub authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Creates/Updates an authorization rule for a NotificationHub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 response for POST requests that return single SharedAccessAuthorizationRule.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void deleteAuthorizationRule(
- String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);
+ SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName,
+ String namespaceName, String notificationHubName, String authorizationRuleName,
+ SharedAccessAuthorizationRuleResourceInner parameters);
/**
* Deletes a notificationHub authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @param authorizationRuleName Authorization Rule Name.
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response deleteAuthorizationRuleWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- Context context);
+ Response deleteAuthorizationRuleWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, String authorizationRuleName, Context context);
/**
- * Gets an authorization rule for a NotificationHub by name.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName authorization rule name.
+ * Deletes a notificationHub authorization rule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 authorization rule for a NotificationHub by name.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(
- String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);
+ void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String notificationHubName,
+ String authorizationRuleName);
/**
* Gets an authorization rule for a NotificationHub by name.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName authorization rule name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 authorization rule for a NotificationHub by name.
+ * @return an authorization rule for a NotificationHub by name along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getAuthorizationRuleWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- Context context);
-
- /**
- * Lists the notification hubs associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @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 of the List NotificationHub operation.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String namespaceName);
+ Response getAuthorizationRuleWithResponse(String resourceGroupName,
+ String namespaceName, String notificationHubName, String authorizationRuleName, Context context);
/**
- * Lists the notification hubs associated with a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Gets an authorization rule for a NotificationHub by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 of the List NotificationHub operation.
+ * @return an authorization rule for a NotificationHub by name.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String namespaceName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(String resourceGroupName, String namespaceName,
+ String notificationHubName, String authorizationRuleName);
/**
* Gets the authorization rules for a NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 authorization rules for a NotificationHub.
+ * @return the authorization rules for a NotificationHub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAuthorizationRules(
- String resourceGroupName, String namespaceName, String notificationHubName);
+ PagedIterable listAuthorizationRules(String resourceGroupName,
+ String namespaceName, String notificationHubName);
/**
* Gets the authorization rules for a NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 authorization rules for a NotificationHub.
+ * @return the authorization rules for a NotificationHub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAuthorizationRules(
- String resourceGroupName, String namespaceName, String notificationHubName, Context context);
+ PagedIterable listAuthorizationRules(String resourceGroupName,
+ String namespaceName, String notificationHubName, Context context);
/**
* Gets the Primary and Secondary ConnectionStrings to the NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @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 Primary and Secondary ConnectionStrings to the NotificationHub.
+ * @return the Primary and Secondary ConnectionStrings to the NotificationHub along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ResourceListKeysInner listKeys(
- String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);
+ Response listKeysWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, String authorizationRuleName, Context context);
/**
* Gets the Primary and Secondary ConnectionStrings to the NotificationHub.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
- * @param context The context to associate with this operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
* @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 Primary and Secondary ConnectionStrings to the NotificationHub.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response listKeysWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- Context context);
+ ResourceListKeysInner listKeys(String resourceGroupName, String namespaceName, String notificationHubName,
+ String authorizationRuleName);
/**
* Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
- * @param parameters Parameters supplied to regenerate the NotificationHub Authorization Rule Key.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
+ * @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 namespace/NotificationHub Connection String.
+ * @return response for the POST request that returns Namespace or NotificationHub access keys (connection strings)
+ * along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ResourceListKeysInner regenerateKeys(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- PolicykeyResource parameters);
+ Response regenerateKeysWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, String authorizationRuleName, PolicyKeyResource parameters, Context context);
/**
* Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
- * @param parameters Parameters supplied to regenerate the NotificationHub Authorization Rule Key.
- * @param context The context to associate with this operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
* @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 namespace/NotificationHub Connection String.
+ * @return response for the POST request that returns Namespace or NotificationHub access keys (connection strings).
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regenerateKeysWithResponse(
- String resourceGroupName,
- String namespaceName,
- String notificationHubName,
- String authorizationRuleName,
- PolicykeyResource parameters,
- Context context);
+ ResourceListKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String notificationHubName,
+ String authorizationRuleName, PolicyKeyResource parameters);
/**
- * Lists the PNS Credentials associated with a notification hub .
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
+ * Lists the PNS Credentials associated with a notification hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
+ * @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 description of a NotificationHub PNS Credentials.
+ * @return description of a NotificationHub PNS Credentials along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- PnsCredentialsResourceInner getPnsCredentials(
- String resourceGroupName, String namespaceName, String notificationHubName);
+ Response getPnsCredentialsWithResponse(String resourceGroupName, String namespaceName,
+ String notificationHubName, Context context);
/**
- * Lists the PNS Credentials associated with a notification hub .
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param notificationHubName The notification hub name.
- * @param context The context to associate with this operation.
+ * Lists the PNS Credentials associated with a notification hub.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param notificationHubName Notification Hub name.
* @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 description of a NotificationHub PNS Credentials.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getPnsCredentialsWithResponse(
- String resourceGroupName, String namespaceName, String notificationHubName, Context context);
+ PnsCredentialsResourceInner getPnsCredentials(String resourceGroupName, String namespaceName,
+ String notificationHubName);
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsManagementClient.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsRPClient.java
similarity index 74%
rename from sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsManagementClient.java
rename to sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsRPClient.java
index 29ade8278fa8..776096c9a446 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsManagementClient.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NotificationHubsRPClient.java
@@ -7,62 +7,70 @@
import com.azure.core.http.HttpPipeline;
import java.time.Duration;
-/** The interface for NotificationHubsManagementClient class. */
-public interface NotificationHubsManagementClient {
+/**
+ * The interface for NotificationHubsRPClient class.
+ */
+public interface NotificationHubsRPClient {
/**
- * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID
- * forms part of the URI for every service call.
- *
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
* @return the subscriptionId value.
*/
String getSubscriptionId();
/**
* Gets server parameter.
- *
+ *
* @return the endpoint value.
*/
String getEndpoint();
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
String getApiVersion();
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
HttpPipeline getHttpPipeline();
/**
* Gets The default poll interval for long-running operation.
- *
+ *
* @return the defaultPollInterval value.
*/
Duration getDefaultPollInterval();
/**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
+ * Gets the NotificationHubsClient object to access its operations.
+ *
+ * @return the NotificationHubsClient object.
*/
- OperationsClient getOperations();
+ NotificationHubsClient getNotificationHubs();
/**
* Gets the NamespacesClient object to access its operations.
- *
+ *
* @return the NamespacesClient object.
*/
NamespacesClient getNamespaces();
/**
- * Gets the NotificationHubsClient object to access its operations.
- *
- * @return the NotificationHubsClient object.
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
*/
- NotificationHubsClient getNotificationHubs();
+ OperationsClient getOperations();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/OperationsClient.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/OperationsClient.java
index 321a39a96140..a15807903b07 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/OperationsClient.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/OperationsClient.java
@@ -10,26 +10,30 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.notificationhubs.fluent.models.OperationInner;
-/** An instance of this class provides access to all the operations defined in OperationsClient. */
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
public interface OperationsClient {
/**
- * Lists all of the available NotificationHubs REST API operations.
- *
+ * Lists all available Notification Hubs operations.
+ *
* @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 result of the request to list NotificationHubs operations.
+ * @return result of the request to list NotificationHubs operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all of the available NotificationHubs REST API operations.
- *
+ * Lists all available Notification Hubs operations.
+ *
* @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 result of the request to list NotificationHubs operations.
+ * @return result of the request to list NotificationHubs operations as paginated response with
+ * {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/PrivateEndpointConnectionsClient.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..dbc6f4cd30a9
--- /dev/null
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,306 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.notificationhubs.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.notificationhubs.fluent.models.PrivateEndpointConnectionResourceInner;
+import com.azure.resourcemanager.notificationhubs.fluent.models.PrivateLinkResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient.
+ */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Approves or rejects Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @param parameters Description of the Private Endpoint Connection resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of represents a Private Endpoint Connection ARM resource - a
+ * sub-resource of Notification Hubs namespace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionResourceInner> beginUpdate(
+ String resourceGroupName, String namespaceName, String privateEndpointConnectionName,
+ PrivateEndpointConnectionResourceInner parameters);
+
+ /**
+ * Approves or rejects Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @param parameters Description of the Private Endpoint Connection resource.
+ * @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 SyncPoller} for polling of represents a Private Endpoint Connection ARM resource - a
+ * sub-resource of Notification Hubs namespace.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionResourceInner> beginUpdate(
+ String resourceGroupName, String namespaceName, String privateEndpointConnectionName,
+ PrivateEndpointConnectionResourceInner parameters, Context context);
+
+ /**
+ * Approves or rejects Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @param parameters Description of the Private Endpoint Connection resource.
+ * @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 represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionResourceInner update(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters);
+
+ /**
+ * Approves or rejects Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @param parameters Description of the Private Endpoint Connection resource.
+ * @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 represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionResourceInner update(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionResourceInner parameters, Context context);
+
+ /**
+ * Deletes the Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Deletes the Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @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 SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes the Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @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 namespaceName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the Private Endpoint Connection.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String namespaceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Returns a Private Endpoint Connection with a given name.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @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 represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace
+ * along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName, Context context);
+
+ /**
+ * Returns a Private Endpoint Connection with a given name.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param privateEndpointConnectionName Private Endpoint Connection Name.
+ * @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 represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionResourceInner get(String resourceGroupName, String namespaceName,
+ String privateEndpointConnectionName);
+
+ /**
+ * Returns all Private Endpoint Connections that belong to the given Notification Hubs namespace.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 of the List Private Endpoint Connections operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String namespaceName);
+
+ /**
+ * Returns all Private Endpoint Connections that belong to the given Notification Hubs namespace.
+ * This is a public API that can be called directly by Notification Hubs users.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 response of the List Private Endpoint Connections operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String namespaceName,
+ Context context);
+
+ /**
+ * Returns Group Id response.
+ * This is a public API required by the Networking RP contract. It can be used directly by Notification Hubs users.
+ *
+ * Even though this namespace requires subscription id, resource group and namespace name, it returns a constant
+ * payload (for a given namespacE) every time it's called.
+ * That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the
+ * request.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param subResourceName Name of the Private Link sub-resource. The only supported sub-resource is "namespace".
+ * @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 a Private Link Arm Resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getGroupIdWithResponse(String resourceGroupName, String namespaceName,
+ String subResourceName, Context context);
+
+ /**
+ * Returns Group Id response.
+ * This is a public API required by the Networking RP contract. It can be used directly by Notification Hubs users.
+ *
+ * Even though this namespace requires subscription id, resource group and namespace name, it returns a constant
+ * payload (for a given namespacE) every time it's called.
+ * That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the
+ * request.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param subResourceName Name of the Private Link sub-resource. The only supported sub-resource is "namespace".
+ * @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 a Private Link Arm Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceInner getGroupId(String resourceGroupName, String namespaceName, String subResourceName);
+
+ /**
+ * Returns all Group Ids supported by the Notification Hubs RP.
+ * This is a public API required by the Networking RP contract. It can be used directly by Notification Hubs users.
+ *
+ * Even though this namespace requires subscription id, resource group and namespace name, it returns a constant
+ * payload (for a given namespacE) every time it's called.
+ * That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the
+ * request.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 of the List Private Link Resources operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGroupIds(String resourceGroupName, String namespaceName);
+
+ /**
+ * Returns all Group Ids supported by the Notification Hubs RP.
+ * This is a public API required by the Networking RP contract. It can be used directly by Notification Hubs users.
+ *
+ * Even though this namespace requires subscription id, resource group and namespace name, it returns a constant
+ * payload (for a given namespacE) every time it's called.
+ * That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the
+ * request.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 response of the List Private Link Resources operation as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listGroupIds(String resourceGroupName, String namespaceName,
+ Context context);
+}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ApnsCredentialProperties.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ApnsCredentialProperties.java
deleted file mode 100644
index 323255b06eac..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ApnsCredentialProperties.java
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Description of a NotificationHub ApnsCredential. Note that there is no explicit switch between Certificate and Token
- * Authentication Modes. The mode is determined based on the properties passed in.
- */
-@Fluent
-public final class ApnsCredentialProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ApnsCredentialProperties.class);
-
- /*
- * The APNS certificate. Specify if using Certificate Authentication Mode.
- */
- @JsonProperty(value = "apnsCertificate")
- private String apnsCertificate;
-
- /*
- * The APNS certificate password if it exists.
- */
- @JsonProperty(value = "certificateKey")
- private String certificateKey;
-
- /*
- * The APNS endpoint of this credential. If using Certificate
- * Authentication Mode and Sandbox specify
- * 'gateway.sandbox.push.apple.com'. If using Certificate Authentication
- * Mode and Production specify 'gateway.push.apple.com'. If using Token
- * Authentication Mode and Sandbox specify
- * 'https://api.development.push.apple.com:443/3/device'. If using Token
- * Authentication Mode and Production specify
- * 'https://api.push.apple.com:443/3/device'.
- */
- @JsonProperty(value = "endpoint")
- private String endpoint;
-
- /*
- * The APNS certificate thumbprint. Specify if using Certificate
- * Authentication Mode.
- */
- @JsonProperty(value = "thumbprint")
- private String thumbprint;
-
- /*
- * A 10-character key identifier (kid) key, obtained from your developer
- * account. Specify if using Token Authentication Mode.
- */
- @JsonProperty(value = "keyId")
- private String keyId;
-
- /*
- * The name of the application or BundleId. Specify if using Token
- * Authentication Mode.
- */
- @JsonProperty(value = "appName")
- private String appName;
-
- /*
- * The issuer (iss) registered claim key. The value is a 10-character
- * TeamId, obtained from your developer account. Specify if using Token
- * Authentication Mode.
- */
- @JsonProperty(value = "appId")
- private String appId;
-
- /*
- * Provider Authentication Token, obtained through your developer account.
- * Specify if using Token Authentication Mode.
- */
- @JsonProperty(value = "token")
- private String token;
-
- /**
- * Get the apnsCertificate property: The APNS certificate. Specify if using Certificate Authentication Mode.
- *
- * @return the apnsCertificate value.
- */
- public String apnsCertificate() {
- return this.apnsCertificate;
- }
-
- /**
- * Set the apnsCertificate property: The APNS certificate. Specify if using Certificate Authentication Mode.
- *
- * @param apnsCertificate the apnsCertificate value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withApnsCertificate(String apnsCertificate) {
- this.apnsCertificate = apnsCertificate;
- return this;
- }
-
- /**
- * Get the certificateKey property: The APNS certificate password if it exists.
- *
- * @return the certificateKey value.
- */
- public String certificateKey() {
- return this.certificateKey;
- }
-
- /**
- * Set the certificateKey property: The APNS certificate password if it exists.
- *
- * @param certificateKey the certificateKey value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withCertificateKey(String certificateKey) {
- this.certificateKey = certificateKey;
- return this;
- }
-
- /**
- * Get the endpoint property: The APNS endpoint of this credential. If using Certificate Authentication Mode and
- * Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify
- * 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify
- * 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify
- * 'https://api.push.apple.com:443/3/device'.
- *
- * @return the endpoint value.
- */
- public String endpoint() {
- return this.endpoint;
- }
-
- /**
- * Set the endpoint property: The APNS endpoint of this credential. If using Certificate Authentication Mode and
- * Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify
- * 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify
- * 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify
- * 'https://api.push.apple.com:443/3/device'.
- *
- * @param endpoint the endpoint value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withEndpoint(String endpoint) {
- this.endpoint = endpoint;
- return this;
- }
-
- /**
- * Get the thumbprint property: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode.
- *
- * @return the thumbprint value.
- */
- public String thumbprint() {
- return this.thumbprint;
- }
-
- /**
- * Set the thumbprint property: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode.
- *
- * @param thumbprint the thumbprint value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withThumbprint(String thumbprint) {
- this.thumbprint = thumbprint;
- return this;
- }
-
- /**
- * Get the keyId property: A 10-character key identifier (kid) key, obtained from your developer account. Specify if
- * using Token Authentication Mode.
- *
- * @return the keyId value.
- */
- public String keyId() {
- return this.keyId;
- }
-
- /**
- * Set the keyId property: A 10-character key identifier (kid) key, obtained from your developer account. Specify if
- * using Token Authentication Mode.
- *
- * @param keyId the keyId value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withKeyId(String keyId) {
- this.keyId = keyId;
- return this;
- }
-
- /**
- * Get the appName property: The name of the application or BundleId. Specify if using Token Authentication Mode.
- *
- * @return the appName value.
- */
- public String appName() {
- return this.appName;
- }
-
- /**
- * Set the appName property: The name of the application or BundleId. Specify if using Token Authentication Mode.
- *
- * @param appName the appName value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withAppName(String appName) {
- this.appName = appName;
- return this;
- }
-
- /**
- * Get the appId property: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from
- * your developer account. Specify if using Token Authentication Mode.
- *
- * @return the appId value.
- */
- public String appId() {
- return this.appId;
- }
-
- /**
- * Set the appId property: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from
- * your developer account. Specify if using Token Authentication Mode.
- *
- * @param appId the appId value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withAppId(String appId) {
- this.appId = appId;
- return this;
- }
-
- /**
- * Get the token property: Provider Authentication Token, obtained through your developer account. Specify if using
- * Token Authentication Mode.
- *
- * @return the token value.
- */
- public String token() {
- return this.token;
- }
-
- /**
- * Set the token property: Provider Authentication Token, obtained through your developer account. Specify if using
- * Token Authentication Mode.
- *
- * @param token the token value to set.
- * @return the ApnsCredentialProperties object itself.
- */
- public ApnsCredentialProperties withToken(String token) {
- this.token = token;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/CheckAvailabilityResultInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/CheckAvailabilityResultInner.java
index 01a9fc91faaf..a3839b8f6b9f 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/CheckAvailabilityResultInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/CheckAvailabilityResultInner.java
@@ -5,35 +5,60 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** Description of a CheckAvailability resource. */
+/**
+ * Description of a CheckAvailability resource.
+ */
@Fluent
-public final class CheckAvailabilityResultInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckAvailabilityResultInner.class);
-
+public final class CheckAvailabilityResultInner extends ProxyResource {
/*
- * True if the name is available and can be used to create new
- * Namespace/NotificationHub. Otherwise false.
+ * Gets or sets true if the name is available and can be used to
+ * create new Namespace/NotificationHub. Otherwise false.
*/
@JsonProperty(value = "isAvailiable")
private Boolean isAvailiable;
/*
- * The sku of the created namespace
+ * Deprecated - only for compatibility.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /*
+ * Deprecated - only for compatibility.
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /*
+ * The Sku description for a namespace
*/
@JsonProperty(value = "sku")
private Sku sku;
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of CheckAvailabilityResultInner class.
+ */
+ public CheckAvailabilityResultInner() {
+ }
+
/**
- * Get the isAvailiable property: True if the name is available and can be used to create new
- * Namespace/NotificationHub. Otherwise false.
- *
+ * Get the isAvailiable property: Gets or sets true if the name is available and can be used to
+ * create new Namespace/NotificationHub. Otherwise false.
+ *
* @return the isAvailiable value.
*/
public Boolean isAvailiable() {
@@ -41,9 +66,9 @@ public Boolean isAvailiable() {
}
/**
- * Set the isAvailiable property: True if the name is available and can be used to create new
- * Namespace/NotificationHub. Otherwise false.
- *
+ * Set the isAvailiable property: Gets or sets true if the name is available and can be used to
+ * create new Namespace/NotificationHub. Otherwise false.
+ *
* @param isAvailiable the isAvailiable value to set.
* @return the CheckAvailabilityResultInner object itself.
*/
@@ -53,8 +78,48 @@ public CheckAvailabilityResultInner withIsAvailiable(Boolean isAvailiable) {
}
/**
- * Get the sku property: The sku of the created namespace.
- *
+ * Get the location property: Deprecated - only for compatibility.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Deprecated - only for compatibility.
+ *
+ * @param location the location value to set.
+ * @return the CheckAvailabilityResultInner object itself.
+ */
+ public CheckAvailabilityResultInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Deprecated - only for compatibility.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Deprecated - only for compatibility.
+ *
+ * @param tags the tags value to set.
+ * @return the CheckAvailabilityResultInner object itself.
+ */
+ public CheckAvailabilityResultInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The Sku description for a namespace.
+ *
* @return the sku value.
*/
public Sku sku() {
@@ -62,8 +127,8 @@ public Sku sku() {
}
/**
- * Set the sku property: The sku of the created namespace.
- *
+ * Set the sku property: The Sku description for a namespace.
+ *
* @param sku the sku value to set.
* @return the CheckAvailabilityResultInner object itself.
*/
@@ -72,23 +137,18 @@ public CheckAvailabilityResultInner withSku(Sku sku) {
return this;
}
- /** {@inheritDoc} */
- @Override
- public CheckAvailabilityResultInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public CheckAvailabilityResultInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResponseInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResponseInner.java
index 891d9bb7e8d8..344651d70ee2 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResponseInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResponseInner.java
@@ -5,153 +5,126 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.DebugSendResult;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** Description of a NotificationHub Resource. */
+/**
+ * Description of a NotificationHub Resource.
+ */
@Fluent
-public final class DebugSendResponseInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DebugSendResponseInner.class);
-
+public final class DebugSendResponseInner extends ProxyResource {
/*
- * Properties of the NotificationHub.
+ * Result of DebugSend operations.
*/
@JsonProperty(value = "properties")
- private DebugSendResult innerProperties;
+ private DebugSendResult properties;
/*
- * The sku of the created namespace
+ * Deprecated - only for compatibility.
*/
- @JsonProperty(value = "sku")
- private Sku sku;
+ @JsonProperty(value = "location")
+ private String location;
- /**
- * Get the innerProperties property: Properties of the NotificationHub.
- *
- * @return the innerProperties value.
+ /*
+ * Deprecated - only for compatibility.
*/
- private DebugSendResult innerProperties() {
- return this.innerProperties;
- }
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
- /**
- * Get the sku property: The sku of the created namespace.
- *
- * @return the sku value.
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- public Sku sku() {
- return this.sku;
- }
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
- * Set the sku property: The sku of the created namespace.
- *
- * @param sku the sku value to set.
- * @return the DebugSendResponseInner object itself.
+ * Creates an instance of DebugSendResponseInner class.
*/
- public DebugSendResponseInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DebugSendResponseInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public DebugSendResponseInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ public DebugSendResponseInner() {
}
/**
- * Get the success property: successful send.
- *
- * @return the success value.
+ * Get the properties property: Result of DebugSend operations.
+ *
+ * @return the properties value.
*/
- public Float success() {
- return this.innerProperties() == null ? null : this.innerProperties().success();
+ public DebugSendResult properties() {
+ return this.properties;
}
/**
- * Set the success property: successful send.
- *
- * @param success the success value to set.
+ * Set the properties property: Result of DebugSend operations.
+ *
+ * @param properties the properties value to set.
* @return the DebugSendResponseInner object itself.
*/
- public DebugSendResponseInner withSuccess(Float success) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DebugSendResult();
- }
- this.innerProperties().withSuccess(success);
+ public DebugSendResponseInner withProperties(DebugSendResult properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the failure property: send failure.
- *
- * @return the failure value.
+ * Get the location property: Deprecated - only for compatibility.
+ *
+ * @return the location value.
*/
- public Float failure() {
- return this.innerProperties() == null ? null : this.innerProperties().failure();
+ public String location() {
+ return this.location;
}
/**
- * Set the failure property: send failure.
- *
- * @param failure the failure value to set.
+ * Set the location property: Deprecated - only for compatibility.
+ *
+ * @param location the location value to set.
* @return the DebugSendResponseInner object itself.
*/
- public DebugSendResponseInner withFailure(Float failure) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DebugSendResult();
- }
- this.innerProperties().withFailure(failure);
+ public DebugSendResponseInner withLocation(String location) {
+ this.location = location;
return this;
}
/**
- * Get the results property: actual failure description.
- *
- * @return the results value.
+ * Get the tags property: Deprecated - only for compatibility.
+ *
+ * @return the tags value.
*/
- public Object results() {
- return this.innerProperties() == null ? null : this.innerProperties().results();
+ public Map tags() {
+ return this.tags;
}
/**
- * Set the results property: actual failure description.
- *
- * @param results the results value to set.
+ * Set the tags property: Deprecated - only for compatibility.
+ *
+ * @param tags the tags value to set.
* @return the DebugSendResponseInner object itself.
*/
- public DebugSendResponseInner withResults(Object results) {
- if (this.innerProperties() == null) {
- this.innerProperties = new DebugSendResult();
- }
- this.innerProperties().withResults(results);
+ public DebugSendResponseInner withTags(Map tags) {
+ this.tags = tags;
return this;
}
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (sku() != null) {
- sku().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResult.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResult.java
deleted file mode 100644
index a9c882cb31d9..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/DebugSendResult.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The DebugSendResult model. */
-@Fluent
-public final class DebugSendResult {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DebugSendResult.class);
-
- /*
- * successful send
- */
- @JsonProperty(value = "success")
- private Float success;
-
- /*
- * send failure
- */
- @JsonProperty(value = "failure")
- private Float failure;
-
- /*
- * actual failure description
- */
- @JsonProperty(value = "results")
- private Object results;
-
- /**
- * Get the success property: successful send.
- *
- * @return the success value.
- */
- public Float success() {
- return this.success;
- }
-
- /**
- * Set the success property: successful send.
- *
- * @param success the success value to set.
- * @return the DebugSendResult object itself.
- */
- public DebugSendResult withSuccess(Float success) {
- this.success = success;
- return this;
- }
-
- /**
- * Get the failure property: send failure.
- *
- * @return the failure value.
- */
- public Float failure() {
- return this.failure;
- }
-
- /**
- * Set the failure property: send failure.
- *
- * @param failure the failure value to set.
- * @return the DebugSendResult object itself.
- */
- public DebugSendResult withFailure(Float failure) {
- this.failure = failure;
- return this;
- }
-
- /**
- * Get the results property: actual failure description.
- *
- * @return the results value.
- */
- public Object results() {
- return this.results;
- }
-
- /**
- * Set the results property: actual failure description.
- *
- * @param results the results value to set.
- * @return the DebugSendResult object itself.
- */
- public DebugSendResult withResults(Object results) {
- this.results = results;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceProperties.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceProperties.java
deleted file mode 100644
index 98bb7a513216..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceProperties.java
+++ /dev/null
@@ -1,390 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-
-/** Namespace properties. */
-@Fluent
-public final class NamespaceProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceProperties.class);
-
- /*
- * The name of the namespace.
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * Provisioning state of the Namespace.
- */
- @JsonProperty(value = "provisioningState")
- private String provisioningState;
-
- /*
- * Specifies the targeted region in which the namespace should be created.
- * It can be any of the following values: Australia East, Australia
- * Southeast, Central US, East US, East US 2, West US, North Central US,
- * South Central US, East Asia, Southeast Asia, Brazil South, Japan East,
- * Japan West, North Europe, West Europe
- */
- @JsonProperty(value = "region")
- private String region;
-
- /*
- * Identifier for Azure Insights metrics
- */
- @JsonProperty(value = "metricId", access = JsonProperty.Access.WRITE_ONLY)
- private String metricId;
-
- /*
- * Status of the namespace. It can be any of these values:1 =
- * Created/Active2 = Creating3 = Suspended4 = Deleting
- */
- @JsonProperty(value = "status")
- private String status;
-
- /*
- * The time the namespace was created.
- */
- @JsonProperty(value = "createdAt")
- private OffsetDateTime createdAt;
-
- /*
- * The time the namespace was updated.
- */
- @JsonProperty(value = "updatedAt")
- private OffsetDateTime updatedAt;
-
- /*
- * Endpoint you can use to perform NotificationHub operations.
- */
- @JsonProperty(value = "serviceBusEndpoint")
- private String serviceBusEndpoint;
-
- /*
- * The Id of the Azure subscription associated with the namespace.
- */
- @JsonProperty(value = "subscriptionId")
- private String subscriptionId;
-
- /*
- * ScaleUnit where the namespace gets created
- */
- @JsonProperty(value = "scaleUnit")
- private String scaleUnit;
-
- /*
- * Whether or not the namespace is currently enabled.
- */
- @JsonProperty(value = "enabled")
- private Boolean enabled;
-
- /*
- * Whether or not the namespace is set as Critical.
- */
- @JsonProperty(value = "critical")
- private Boolean critical;
-
- /*
- * Data center for the namespace
- */
- @JsonProperty(value = "dataCenter")
- private String dataCenter;
-
- /*
- * The namespace type.
- */
- @JsonProperty(value = "namespaceType")
- private NamespaceType namespaceType;
-
- /**
- * Get the name property: The name of the namespace.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The name of the namespace.
- *
- * @param name the name value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the provisioningState property: Provisioning state of the Namespace.
- *
- * @return the provisioningState value.
- */
- public String provisioningState() {
- return this.provisioningState;
- }
-
- /**
- * Set the provisioningState property: Provisioning state of the Namespace.
- *
- * @param provisioningState the provisioningState value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withProvisioningState(String provisioningState) {
- this.provisioningState = provisioningState;
- return this;
- }
-
- /**
- * Get the region property: Specifies the targeted region in which the namespace should be created. It can be any of
- * the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central
- * US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe.
- *
- * @return the region value.
- */
- public String region() {
- return this.region;
- }
-
- /**
- * Set the region property: Specifies the targeted region in which the namespace should be created. It can be any of
- * the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central
- * US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe.
- *
- * @param region the region value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withRegion(String region) {
- this.region = region;
- return this;
- }
-
- /**
- * Get the metricId property: Identifier for Azure Insights metrics.
- *
- * @return the metricId value.
- */
- public String metricId() {
- return this.metricId;
- }
-
- /**
- * Get the status property: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 =
- * Suspended4 = Deleting.
- *
- * @return the status value.
- */
- public String status() {
- return this.status;
- }
-
- /**
- * Set the status property: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 =
- * Suspended4 = Deleting.
- *
- * @param status the status value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withStatus(String status) {
- this.status = status;
- return this;
- }
-
- /**
- * Get the createdAt property: The time the namespace was created.
- *
- * @return the createdAt value.
- */
- public OffsetDateTime createdAt() {
- return this.createdAt;
- }
-
- /**
- * Set the createdAt property: The time the namespace was created.
- *
- * @param createdAt the createdAt value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
-
- /**
- * Get the updatedAt property: The time the namespace was updated.
- *
- * @return the updatedAt value.
- */
- public OffsetDateTime updatedAt() {
- return this.updatedAt;
- }
-
- /**
- * Set the updatedAt property: The time the namespace was updated.
- *
- * @param updatedAt the updatedAt value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withUpdatedAt(OffsetDateTime updatedAt) {
- this.updatedAt = updatedAt;
- return this;
- }
-
- /**
- * Get the serviceBusEndpoint property: Endpoint you can use to perform NotificationHub operations.
- *
- * @return the serviceBusEndpoint value.
- */
- public String serviceBusEndpoint() {
- return this.serviceBusEndpoint;
- }
-
- /**
- * Set the serviceBusEndpoint property: Endpoint you can use to perform NotificationHub operations.
- *
- * @param serviceBusEndpoint the serviceBusEndpoint value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withServiceBusEndpoint(String serviceBusEndpoint) {
- this.serviceBusEndpoint = serviceBusEndpoint;
- return this;
- }
-
- /**
- * Get the subscriptionId property: The Id of the Azure subscription associated with the namespace.
- *
- * @return the subscriptionId value.
- */
- public String subscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * Set the subscriptionId property: The Id of the Azure subscription associated with the namespace.
- *
- * @param subscriptionId the subscriptionId value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withSubscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
- return this;
- }
-
- /**
- * Get the scaleUnit property: ScaleUnit where the namespace gets created.
- *
- * @return the scaleUnit value.
- */
- public String scaleUnit() {
- return this.scaleUnit;
- }
-
- /**
- * Set the scaleUnit property: ScaleUnit where the namespace gets created.
- *
- * @param scaleUnit the scaleUnit value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withScaleUnit(String scaleUnit) {
- this.scaleUnit = scaleUnit;
- return this;
- }
-
- /**
- * Get the enabled property: Whether or not the namespace is currently enabled.
- *
- * @return the enabled value.
- */
- public Boolean enabled() {
- return this.enabled;
- }
-
- /**
- * Set the enabled property: Whether or not the namespace is currently enabled.
- *
- * @param enabled the enabled value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withEnabled(Boolean enabled) {
- this.enabled = enabled;
- return this;
- }
-
- /**
- * Get the critical property: Whether or not the namespace is set as Critical.
- *
- * @return the critical value.
- */
- public Boolean critical() {
- return this.critical;
- }
-
- /**
- * Set the critical property: Whether or not the namespace is set as Critical.
- *
- * @param critical the critical value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withCritical(Boolean critical) {
- this.critical = critical;
- return this;
- }
-
- /**
- * Get the dataCenter property: Data center for the namespace.
- *
- * @return the dataCenter value.
- */
- public String dataCenter() {
- return this.dataCenter;
- }
-
- /**
- * Set the dataCenter property: Data center for the namespace.
- *
- * @param dataCenter the dataCenter value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withDataCenter(String dataCenter) {
- this.dataCenter = dataCenter;
- return this;
- }
-
- /**
- * Get the namespaceType property: The namespace type.
- *
- * @return the namespaceType value.
- */
- public NamespaceType namespaceType() {
- return this.namespaceType;
- }
-
- /**
- * Set the namespaceType property: The namespace type.
- *
- * @param namespaceType the namespaceType value to set.
- * @return the NamespaceProperties object itself.
- */
- public NamespaceProperties withNamespaceType(NamespaceType namespaceType) {
- this.namespaceType = namespaceType;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceResourceInner.java
index 74cb45a017ad..ba7debb2de40 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceResourceInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NamespaceResourceInner.java
@@ -6,43 +6,45 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceType;
+import com.azure.resourcemanager.notificationhubs.models.NamespaceProperties;
import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
import java.util.Map;
-/** Description of a Namespace resource. */
+/**
+ * Notification Hubs Namespace Resource.
+ */
@Fluent
public final class NamespaceResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(NamespaceResourceInner.class);
+ /*
+ * The Sku description for a namespace
+ */
+ @JsonProperty(value = "sku", required = true)
+ private Sku sku;
/*
- * Properties of the Namespace.
+ * Represents namespace properties.
*/
@JsonProperty(value = "properties")
- private NamespaceProperties innerProperties;
+ private NamespaceProperties properties;
/*
- * The sku of the created namespace
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "sku")
- private Sku sku;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
- * Get the innerProperties property: Properties of the Namespace.
- *
- * @return the innerProperties value.
+ * Creates an instance of NamespaceResourceInner class.
*/
- private NamespaceProperties innerProperties() {
- return this.innerProperties;
+ public NamespaceResourceInner() {
}
/**
- * Get the sku property: The sku of the created namespace.
- *
+ * Get the sku property: The Sku description for a namespace.
+ *
* @return the sku value.
*/
public Sku sku() {
@@ -50,8 +52,8 @@ public Sku sku() {
}
/**
- * Set the sku property: The sku of the created namespace.
- *
+ * Set the sku property: The Sku description for a namespace.
+ *
* @param sku the sku value to set.
* @return the NamespaceResourceInner object itself.
*/
@@ -60,345 +62,69 @@ public NamespaceResourceInner withSku(Sku sku) {
return this;
}
- /** {@inheritDoc} */
- @Override
- public NamespaceResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public NamespaceResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the name property: The name of the namespace.
- *
- * @return the name value.
- */
- public String namePropertiesName() {
- return this.innerProperties() == null ? null : this.innerProperties().name();
- }
-
- /**
- * Set the name property: The name of the namespace.
- *
- * @param name the name value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withNamePropertiesName(String name) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withName(name);
- return this;
- }
-
- /**
- * Get the provisioningState property: Provisioning state of the Namespace.
- *
- * @return the provisioningState value.
- */
- public String provisioningState() {
- return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
- }
-
- /**
- * Set the provisioningState property: Provisioning state of the Namespace.
- *
- * @param provisioningState the provisioningState value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withProvisioningState(String provisioningState) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withProvisioningState(provisioningState);
- return this;
- }
-
- /**
- * Get the region property: Specifies the targeted region in which the namespace should be created. It can be any of
- * the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central
- * US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe.
- *
- * @return the region value.
- */
- public String region() {
- return this.innerProperties() == null ? null : this.innerProperties().region();
- }
-
- /**
- * Set the region property: Specifies the targeted region in which the namespace should be created. It can be any of
- * the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central
- * US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe.
- *
- * @param region the region value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withRegion(String region) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withRegion(region);
- return this;
- }
-
- /**
- * Get the metricId property: Identifier for Azure Insights metrics.
- *
- * @return the metricId value.
- */
- public String metricId() {
- return this.innerProperties() == null ? null : this.innerProperties().metricId();
- }
-
- /**
- * Get the status property: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 =
- * Suspended4 = Deleting.
- *
- * @return the status value.
- */
- public String status() {
- return this.innerProperties() == null ? null : this.innerProperties().status();
- }
-
- /**
- * Set the status property: Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 =
- * Suspended4 = Deleting.
- *
- * @param status the status value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withStatus(String status) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withStatus(status);
- return this;
- }
-
- /**
- * Get the createdAt property: The time the namespace was created.
- *
- * @return the createdAt value.
- */
- public OffsetDateTime createdAt() {
- return this.innerProperties() == null ? null : this.innerProperties().createdAt();
- }
-
- /**
- * Set the createdAt property: The time the namespace was created.
- *
- * @param createdAt the createdAt value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withCreatedAt(OffsetDateTime createdAt) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withCreatedAt(createdAt);
- return this;
- }
-
- /**
- * Get the updatedAt property: The time the namespace was updated.
- *
- * @return the updatedAt value.
- */
- public OffsetDateTime updatedAt() {
- return this.innerProperties() == null ? null : this.innerProperties().updatedAt();
- }
-
- /**
- * Set the updatedAt property: The time the namespace was updated.
- *
- * @param updatedAt the updatedAt value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withUpdatedAt(OffsetDateTime updatedAt) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withUpdatedAt(updatedAt);
- return this;
- }
-
- /**
- * Get the serviceBusEndpoint property: Endpoint you can use to perform NotificationHub operations.
- *
- * @return the serviceBusEndpoint value.
- */
- public String serviceBusEndpoint() {
- return this.innerProperties() == null ? null : this.innerProperties().serviceBusEndpoint();
- }
-
- /**
- * Set the serviceBusEndpoint property: Endpoint you can use to perform NotificationHub operations.
- *
- * @param serviceBusEndpoint the serviceBusEndpoint value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withServiceBusEndpoint(String serviceBusEndpoint) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withServiceBusEndpoint(serviceBusEndpoint);
- return this;
- }
-
- /**
- * Get the subscriptionId property: The Id of the Azure subscription associated with the namespace.
- *
- * @return the subscriptionId value.
- */
- public String subscriptionId() {
- return this.innerProperties() == null ? null : this.innerProperties().subscriptionId();
- }
-
- /**
- * Set the subscriptionId property: The Id of the Azure subscription associated with the namespace.
- *
- * @param subscriptionId the subscriptionId value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withSubscriptionId(String subscriptionId) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withSubscriptionId(subscriptionId);
- return this;
- }
-
- /**
- * Get the scaleUnit property: ScaleUnit where the namespace gets created.
- *
- * @return the scaleUnit value.
- */
- public String scaleUnit() {
- return this.innerProperties() == null ? null : this.innerProperties().scaleUnit();
- }
-
- /**
- * Set the scaleUnit property: ScaleUnit where the namespace gets created.
- *
- * @param scaleUnit the scaleUnit value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withScaleUnit(String scaleUnit) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withScaleUnit(scaleUnit);
- return this;
- }
-
/**
- * Get the enabled property: Whether or not the namespace is currently enabled.
- *
- * @return the enabled value.
+ * Get the properties property: Represents namespace properties.
+ *
+ * @return the properties value.
*/
- public Boolean enabled() {
- return this.innerProperties() == null ? null : this.innerProperties().enabled();
+ public NamespaceProperties properties() {
+ return this.properties;
}
/**
- * Set the enabled property: Whether or not the namespace is currently enabled.
- *
- * @param enabled the enabled value to set.
+ * Set the properties property: Represents namespace properties.
+ *
+ * @param properties the properties value to set.
* @return the NamespaceResourceInner object itself.
*/
- public NamespaceResourceInner withEnabled(Boolean enabled) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withEnabled(enabled);
+ public NamespaceResourceInner withProperties(NamespaceProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the critical property: Whether or not the namespace is set as Critical.
- *
- * @return the critical value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public Boolean critical() {
- return this.innerProperties() == null ? null : this.innerProperties().critical();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Set the critical property: Whether or not the namespace is set as Critical.
- *
- * @param critical the critical value to set.
- * @return the NamespaceResourceInner object itself.
+ * {@inheritDoc}
*/
- public NamespaceResourceInner withCritical(Boolean critical) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withCritical(critical);
- return this;
- }
-
- /**
- * Get the dataCenter property: Data center for the namespace.
- *
- * @return the dataCenter value.
- */
- public String dataCenter() {
- return this.innerProperties() == null ? null : this.innerProperties().dataCenter();
- }
-
- /**
- * Set the dataCenter property: Data center for the namespace.
- *
- * @param dataCenter the dataCenter value to set.
- * @return the NamespaceResourceInner object itself.
- */
- public NamespaceResourceInner withDataCenter(String dataCenter) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withDataCenter(dataCenter);
+ @Override
+ public NamespaceResourceInner withLocation(String location) {
+ super.withLocation(location);
return this;
}
/**
- * Get the namespaceType property: The namespace type.
- *
- * @return the namespaceType value.
- */
- public NamespaceType namespaceType() {
- return this.innerProperties() == null ? null : this.innerProperties().namespaceType();
- }
-
- /**
- * Set the namespaceType property: The namespace type.
- *
- * @param namespaceType the namespaceType value to set.
- * @return the NamespaceResourceInner object itself.
+ * {@inheritDoc}
*/
- public NamespaceResourceInner withNamespaceType(NamespaceType namespaceType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NamespaceProperties();
- }
- this.innerProperties().withNamespaceType(namespaceType);
+ @Override
+ public NamespaceResourceInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (sku() != null) {
+ if (sku() == null) {
+ throw LOGGER.logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model NamespaceResourceInner"));
+ } else {
sku().validate();
}
+ if (properties() != null) {
+ properties().validate();
+ }
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(NamespaceResourceInner.class);
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NotificationHubResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NotificationHubResourceInner.java
index c449525c9cb6..733dbd407b9c 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NotificationHubResourceInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/NotificationHubResourceInner.java
@@ -6,295 +6,116 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.AdmCredential;
-import com.azure.resourcemanager.notificationhubs.models.ApnsCredential;
-import com.azure.resourcemanager.notificationhubs.models.BaiduCredential;
-import com.azure.resourcemanager.notificationhubs.models.GcmCredential;
-import com.azure.resourcemanager.notificationhubs.models.MpnsCredential;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.NotificationHubProperties;
import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.azure.resourcemanager.notificationhubs.models.WnsCredential;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
import java.util.Map;
-/** Description of a NotificationHub Resource. */
+/**
+ * Notification Hub Resource.
+ */
@Fluent
public final class NotificationHubResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(NotificationHubResourceInner.class);
-
/*
- * Properties of the NotificationHub.
+ * NotificationHub properties.
*/
@JsonProperty(value = "properties")
- private NotificationHubProperties innerProperties;
+ private NotificationHubProperties properties;
/*
- * The sku of the created namespace
+ * The Sku description for a namespace
*/
@JsonProperty(value = "sku")
private Sku sku;
- /**
- * Get the innerProperties property: Properties of the NotificationHub.
- *
- * @return the innerProperties value.
- */
- private NotificationHubProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the sku property: The sku of the created namespace.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku of the created namespace.
- *
- * @param sku the sku value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public NotificationHubResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public NotificationHubResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the name property: The NotificationHub name.
- *
- * @return the name value.
- */
- public String namePropertiesName() {
- return this.innerProperties() == null ? null : this.innerProperties().name();
- }
-
- /**
- * Set the name property: The NotificationHub name.
- *
- * @param name the name value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withNamePropertiesName(String name) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withName(name);
- return this;
- }
-
- /**
- * Get the registrationTtl property: The RegistrationTtl of the created NotificationHub.
- *
- * @return the registrationTtl value.
- */
- public String registrationTtl() {
- return this.innerProperties() == null ? null : this.innerProperties().registrationTtl();
- }
-
- /**
- * Set the registrationTtl property: The RegistrationTtl of the created NotificationHub.
- *
- * @param registrationTtl the registrationTtl value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withRegistrationTtl(String registrationTtl) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withRegistrationTtl(registrationTtl);
- return this;
- }
-
- /**
- * Get the authorizationRules property: The AuthorizationRules of the created NotificationHub.
- *
- * @return the authorizationRules value.
- */
- public List authorizationRules() {
- return this.innerProperties() == null ? null : this.innerProperties().authorizationRules();
- }
-
- /**
- * Set the authorizationRules property: The AuthorizationRules of the created NotificationHub.
- *
- * @param authorizationRules the authorizationRules value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withAuthorizationRules(
- List authorizationRules) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withAuthorizationRules(authorizationRules);
- return this;
- }
-
- /**
- * Get the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @return the apnsCredential value.
- */
- public ApnsCredential apnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().apnsCredential();
- }
-
- /**
- * Set the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @param apnsCredential the apnsCredential value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withApnsCredential(ApnsCredential apnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withApnsCredential(apnsCredential);
- return this;
- }
-
- /**
- * Get the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @return the wnsCredential value.
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- public WnsCredential wnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().wnsCredential();
- }
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
- * Set the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @param wnsCredential the wnsCredential value to set.
- * @return the NotificationHubResourceInner object itself.
+ * Creates an instance of NotificationHubResourceInner class.
*/
- public NotificationHubResourceInner withWnsCredential(WnsCredential wnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withWnsCredential(wnsCredential);
- return this;
+ public NotificationHubResourceInner() {
}
/**
- * Get the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @return the gcmCredential value.
+ * Get the properties property: NotificationHub properties.
+ *
+ * @return the properties value.
*/
- public GcmCredential gcmCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().gcmCredential();
+ public NotificationHubProperties properties() {
+ return this.properties;
}
/**
- * Set the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @param gcmCredential the gcmCredential value to set.
+ * Set the properties property: NotificationHub properties.
+ *
+ * @param properties the properties value to set.
* @return the NotificationHubResourceInner object itself.
*/
- public NotificationHubResourceInner withGcmCredential(GcmCredential gcmCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withGcmCredential(gcmCredential);
+ public NotificationHubResourceInner withProperties(NotificationHubProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @return the mpnsCredential value.
+ * Get the sku property: The Sku description for a namespace.
+ *
+ * @return the sku value.
*/
- public MpnsCredential mpnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().mpnsCredential();
+ public Sku sku() {
+ return this.sku;
}
/**
- * Set the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @param mpnsCredential the mpnsCredential value to set.
+ * Set the sku property: The Sku description for a namespace.
+ *
+ * @param sku the sku value to set.
* @return the NotificationHubResourceInner object itself.
*/
- public NotificationHubResourceInner withMpnsCredential(MpnsCredential mpnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withMpnsCredential(mpnsCredential);
+ public NotificationHubResourceInner withSku(Sku sku) {
+ this.sku = sku;
return this;
}
/**
- * Get the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @return the admCredential value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public AdmCredential admCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().admCredential();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
- * Set the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @param admCredential the admCredential value to set.
- * @return the NotificationHubResourceInner object itself.
+ * {@inheritDoc}
*/
- public NotificationHubResourceInner withAdmCredential(AdmCredential admCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withAdmCredential(admCredential);
+ @Override
+ public NotificationHubResourceInner withLocation(String location) {
+ super.withLocation(location);
return this;
}
/**
- * Get the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @return the baiduCredential value.
+ * {@inheritDoc}
*/
- public BaiduCredential baiduCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().baiduCredential();
- }
-
- /**
- * Set the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @param baiduCredential the baiduCredential value to set.
- * @return the NotificationHubResourceInner object itself.
- */
- public NotificationHubResourceInner withBaiduCredential(BaiduCredential baiduCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new NotificationHubProperties();
- }
- this.innerProperties().withBaiduCredential(baiduCredential);
+ @Override
+ public NotificationHubResourceInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
+ if (properties() != null) {
+ properties().validate();
}
if (sku() != null) {
sku().validate();
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/OperationInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/OperationInner.java
index 9a6e47c1903a..c86dca6fafca 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/OperationInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/OperationInner.java
@@ -5,18 +5,17 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.notificationhubs.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.notificationhubs.models.OperationProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** A NotificationHubs REST API operation. */
+/**
+ * A NotificationHubs REST API operation.
+ */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
- * Operation name: {provider}/{resource}/{operation}
+ * Gets operation name: {provider}/{resource}/{operation}
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
@@ -27,9 +26,27 @@ public final class OperationInner {
@JsonProperty(value = "display")
private OperationDisplay display;
+ /*
+ * Optional operation properties.
+ */
+ @JsonProperty(value = "properties")
+ private OperationProperties properties;
+
+ /*
+ * Gets or sets IsDataAction property. It is used to differentiate management and data plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
/**
- * Get the name property: Operation name: {provider}/{resource}/{operation}.
- *
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: Gets operation name: {provider}/{resource}/{operation}.
+ *
* @return the name value.
*/
public String name() {
@@ -38,7 +55,7 @@ public String name() {
/**
* Get the display property: The object that represents the operation.
- *
+ *
* @return the display value.
*/
public OperationDisplay display() {
@@ -47,7 +64,7 @@ public OperationDisplay display() {
/**
* Set the display property: The object that represents the operation.
- *
+ *
* @param display the display value to set.
* @return the OperationInner object itself.
*/
@@ -56,14 +73,47 @@ public OperationInner withDisplay(OperationDisplay display) {
return this;
}
+ /**
+ * Get the properties property: Optional operation properties.
+ *
+ * @return the properties value.
+ */
+ public OperationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Optional operation properties.
+ *
+ * @param properties the properties value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withProperties(OperationProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Gets or sets IsDataAction property. It is used to differentiate management and
+ * data plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (display() != null) {
display().validate();
}
+ if (properties() != null) {
+ properties().validate();
+ }
}
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsProperties.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsProperties.java
deleted file mode 100644
index a23d279302cc..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsProperties.java
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.AdmCredential;
-import com.azure.resourcemanager.notificationhubs.models.ApnsCredential;
-import com.azure.resourcemanager.notificationhubs.models.BaiduCredential;
-import com.azure.resourcemanager.notificationhubs.models.GcmCredential;
-import com.azure.resourcemanager.notificationhubs.models.MpnsCredential;
-import com.azure.resourcemanager.notificationhubs.models.WnsCredential;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Description of a NotificationHub PNS Credentials. */
-@Fluent
-public final class PnsCredentialsProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PnsCredentialsProperties.class);
-
- /*
- * The ApnsCredential of the created NotificationHub
- */
- @JsonProperty(value = "apnsCredential")
- private ApnsCredential apnsCredential;
-
- /*
- * The WnsCredential of the created NotificationHub
- */
- @JsonProperty(value = "wnsCredential")
- private WnsCredential wnsCredential;
-
- /*
- * The GcmCredential of the created NotificationHub
- */
- @JsonProperty(value = "gcmCredential")
- private GcmCredential gcmCredential;
-
- /*
- * The MpnsCredential of the created NotificationHub
- */
- @JsonProperty(value = "mpnsCredential")
- private MpnsCredential mpnsCredential;
-
- /*
- * The AdmCredential of the created NotificationHub
- */
- @JsonProperty(value = "admCredential")
- private AdmCredential admCredential;
-
- /*
- * The BaiduCredential of the created NotificationHub
- */
- @JsonProperty(value = "baiduCredential")
- private BaiduCredential baiduCredential;
-
- /**
- * Get the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @return the apnsCredential value.
- */
- public ApnsCredential apnsCredential() {
- return this.apnsCredential;
- }
-
- /**
- * Set the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @param apnsCredential the apnsCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withApnsCredential(ApnsCredential apnsCredential) {
- this.apnsCredential = apnsCredential;
- return this;
- }
-
- /**
- * Get the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @return the wnsCredential value.
- */
- public WnsCredential wnsCredential() {
- return this.wnsCredential;
- }
-
- /**
- * Set the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @param wnsCredential the wnsCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withWnsCredential(WnsCredential wnsCredential) {
- this.wnsCredential = wnsCredential;
- return this;
- }
-
- /**
- * Get the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @return the gcmCredential value.
- */
- public GcmCredential gcmCredential() {
- return this.gcmCredential;
- }
-
- /**
- * Set the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @param gcmCredential the gcmCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withGcmCredential(GcmCredential gcmCredential) {
- this.gcmCredential = gcmCredential;
- return this;
- }
-
- /**
- * Get the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @return the mpnsCredential value.
- */
- public MpnsCredential mpnsCredential() {
- return this.mpnsCredential;
- }
-
- /**
- * Set the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @param mpnsCredential the mpnsCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withMpnsCredential(MpnsCredential mpnsCredential) {
- this.mpnsCredential = mpnsCredential;
- return this;
- }
-
- /**
- * Get the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @return the admCredential value.
- */
- public AdmCredential admCredential() {
- return this.admCredential;
- }
-
- /**
- * Set the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @param admCredential the admCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withAdmCredential(AdmCredential admCredential) {
- this.admCredential = admCredential;
- return this;
- }
-
- /**
- * Get the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @return the baiduCredential value.
- */
- public BaiduCredential baiduCredential() {
- return this.baiduCredential;
- }
-
- /**
- * Set the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @param baiduCredential the baiduCredential value to set.
- * @return the PnsCredentialsProperties object itself.
- */
- public PnsCredentialsProperties withBaiduCredential(BaiduCredential baiduCredential) {
- this.baiduCredential = baiduCredential;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (apnsCredential() != null) {
- apnsCredential().validate();
- }
- if (wnsCredential() != null) {
- wnsCredential().validate();
- }
- if (gcmCredential() != null) {
- gcmCredential().validate();
- }
- if (mpnsCredential() != null) {
- mpnsCredential().validate();
- }
- if (admCredential() != null) {
- admCredential().validate();
- }
- if (baiduCredential() != null) {
- baiduCredential().validate();
- }
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsResourceInner.java
index 9aff52334465..fe86bb86741d 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsResourceInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PnsCredentialsResourceInner.java
@@ -5,228 +5,128 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.AdmCredential;
-import com.azure.resourcemanager.notificationhubs.models.ApnsCredential;
-import com.azure.resourcemanager.notificationhubs.models.BaiduCredential;
-import com.azure.resourcemanager.notificationhubs.models.GcmCredential;
-import com.azure.resourcemanager.notificationhubs.models.MpnsCredential;
-import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.azure.resourcemanager.notificationhubs.models.WnsCredential;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.PnsCredentials;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** Description of a NotificationHub PNS Credentials. */
+/**
+ * Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or
+ * hubs
+ * PNS credentials.
+ */
@Fluent
-public final class PnsCredentialsResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PnsCredentialsResourceInner.class);
-
+public final class PnsCredentialsResourceInner extends ProxyResource {
/*
- * NotificationHub PNS Credentials.
+ * Collection of Notification Hub or Notification Hub Namespace PNS credentials.
*/
@JsonProperty(value = "properties")
- private PnsCredentialsProperties innerProperties;
+ private PnsCredentials properties;
/*
- * The sku of the created namespace
- */
- @JsonProperty(value = "sku")
- private Sku sku;
-
- /**
- * Get the innerProperties property: NotificationHub PNS Credentials.
- *
- * @return the innerProperties value.
- */
- private PnsCredentialsProperties innerProperties() {
- return this.innerProperties;
- }
-
- /**
- * Get the sku property: The sku of the created namespace.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku of the created namespace.
- *
- * @param sku the sku value to set.
- * @return the PnsCredentialsResourceInner object itself.
- */
- public PnsCredentialsResourceInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public PnsCredentialsResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public PnsCredentialsResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
- }
-
- /**
- * Get the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @return the apnsCredential value.
+ * Deprecated - only for compatibility.
*/
- public ApnsCredential apnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().apnsCredential();
- }
+ @JsonProperty(value = "location")
+ private String location;
- /**
- * Set the apnsCredential property: The ApnsCredential of the created NotificationHub.
- *
- * @param apnsCredential the apnsCredential value to set.
- * @return the PnsCredentialsResourceInner object itself.
+ /*
+ * Deprecated - only for compatibility.
*/
- public PnsCredentialsResourceInner withApnsCredential(ApnsCredential apnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withApnsCredential(apnsCredential);
- return this;
- }
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
- /**
- * Get the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @return the wnsCredential value.
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- public WnsCredential wnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().wnsCredential();
- }
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
- * Set the wnsCredential property: The WnsCredential of the created NotificationHub.
- *
- * @param wnsCredential the wnsCredential value to set.
- * @return the PnsCredentialsResourceInner object itself.
+ * Creates an instance of PnsCredentialsResourceInner class.
*/
- public PnsCredentialsResourceInner withWnsCredential(WnsCredential wnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withWnsCredential(wnsCredential);
- return this;
+ public PnsCredentialsResourceInner() {
}
/**
- * Get the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @return the gcmCredential value.
+ * Get the properties property: Collection of Notification Hub or Notification Hub Namespace PNS credentials.
+ *
+ * @return the properties value.
*/
- public GcmCredential gcmCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().gcmCredential();
+ public PnsCredentials properties() {
+ return this.properties;
}
/**
- * Set the gcmCredential property: The GcmCredential of the created NotificationHub.
- *
- * @param gcmCredential the gcmCredential value to set.
+ * Set the properties property: Collection of Notification Hub or Notification Hub Namespace PNS credentials.
+ *
+ * @param properties the properties value to set.
* @return the PnsCredentialsResourceInner object itself.
*/
- public PnsCredentialsResourceInner withGcmCredential(GcmCredential gcmCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withGcmCredential(gcmCredential);
+ public PnsCredentialsResourceInner withProperties(PnsCredentials properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @return the mpnsCredential value.
+ * Get the location property: Deprecated - only for compatibility.
+ *
+ * @return the location value.
*/
- public MpnsCredential mpnsCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().mpnsCredential();
+ public String location() {
+ return this.location;
}
/**
- * Set the mpnsCredential property: The MpnsCredential of the created NotificationHub.
- *
- * @param mpnsCredential the mpnsCredential value to set.
+ * Set the location property: Deprecated - only for compatibility.
+ *
+ * @param location the location value to set.
* @return the PnsCredentialsResourceInner object itself.
*/
- public PnsCredentialsResourceInner withMpnsCredential(MpnsCredential mpnsCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withMpnsCredential(mpnsCredential);
+ public PnsCredentialsResourceInner withLocation(String location) {
+ this.location = location;
return this;
}
/**
- * Get the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @return the admCredential value.
+ * Get the tags property: Deprecated - only for compatibility.
+ *
+ * @return the tags value.
*/
- public AdmCredential admCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().admCredential();
+ public Map tags() {
+ return this.tags;
}
/**
- * Set the admCredential property: The AdmCredential of the created NotificationHub.
- *
- * @param admCredential the admCredential value to set.
+ * Set the tags property: Deprecated - only for compatibility.
+ *
+ * @param tags the tags value to set.
* @return the PnsCredentialsResourceInner object itself.
*/
- public PnsCredentialsResourceInner withAdmCredential(AdmCredential admCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withAdmCredential(admCredential);
+ public PnsCredentialsResourceInner withTags(Map tags) {
+ this.tags = tags;
return this;
}
/**
- * Get the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @return the baiduCredential value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public BaiduCredential baiduCredential() {
- return this.innerProperties() == null ? null : this.innerProperties().baiduCredential();
- }
-
- /**
- * Set the baiduCredential property: The BaiduCredential of the created NotificationHub.
- *
- * @param baiduCredential the baiduCredential value to set.
- * @return the PnsCredentialsResourceInner object itself.
- */
- public PnsCredentialsResourceInner withBaiduCredential(BaiduCredential baiduCredential) {
- if (this.innerProperties() == null) {
- this.innerProperties = new PnsCredentialsProperties();
- }
- this.innerProperties().withBaiduCredential(baiduCredential);
- return this;
+ public SystemData systemData() {
+ return this.systemData;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (sku() != null) {
- sku().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateEndpointConnectionResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateEndpointConnectionResourceInner.java
new file mode 100644
index 000000000000..73bd75517ebb
--- /dev/null
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateEndpointConnectionResourceInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.notificationhubs.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.PrivateEndpointConnectionProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace.
+ */
+@Fluent
+public final class PrivateEndpointConnectionResourceInner extends ProxyResource {
+ /*
+ * Private Endpoint Connection properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionResourceInner class.
+ */
+ public PrivateEndpointConnectionResourceInner() {
+ }
+
+ /**
+ * Get the properties property: Private Endpoint Connection properties.
+ *
+ * @return the properties value.
+ */
+ public PrivateEndpointConnectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Private Endpoint Connection properties.
+ *
+ * @param properties the properties value to set.
+ * @return the PrivateEndpointConnectionResourceInner object itself.
+ */
+ public PrivateEndpointConnectionResourceInner withProperties(PrivateEndpointConnectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateLinkResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..1284c8d685c2
--- /dev/null
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.notificationhubs.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A Private Link Arm Resource.
+ */
+@Fluent
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * Represents properties of Private Link Resource.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of PrivateLinkResourceInner class.
+ */
+ public PrivateLinkResourceInner() {
+ }
+
+ /**
+ * Get the properties property: Represents properties of Private Link Resource.
+ *
+ * @return the properties value.
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Represents properties of Private Link Resource.
+ *
+ * @param properties the properties value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withProperties(PrivateLinkResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ResourceListKeysInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ResourceListKeysInner.java
index 7ad697fcd00a..81ecc7292b5e 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ResourceListKeysInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/ResourceListKeysInner.java
@@ -4,69 +4,64 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Namespace/NotificationHub Connection String. */
-@Fluent
+/**
+ * Response for the POST request that returns Namespace or NotificationHub access keys (connection strings).
+ */
+@Immutable
public final class ResourceListKeysInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceListKeysInner.class);
-
/*
- * PrimaryConnectionString of the AuthorizationRule.
+ * Gets or sets primaryConnectionString of the AuthorizationRule.
*/
- @JsonProperty(value = "primaryConnectionString")
+ @JsonProperty(value = "primaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
private String primaryConnectionString;
/*
- * SecondaryConnectionString of the created AuthorizationRule
+ * Gets or sets secondaryConnectionString of the created
+ * AuthorizationRule
*/
- @JsonProperty(value = "secondaryConnectionString")
+ @JsonProperty(value = "secondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
private String secondaryConnectionString;
/*
- * PrimaryKey of the created AuthorizationRule.
+ * Gets or sets primaryKey of the created AuthorizationRule.
*/
- @JsonProperty(value = "primaryKey")
+ @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
private String primaryKey;
/*
- * SecondaryKey of the created AuthorizationRule
+ * Gets or sets secondaryKey of the created AuthorizationRule
*/
- @JsonProperty(value = "secondaryKey")
+ @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY)
private String secondaryKey;
/*
- * KeyName of the created AuthorizationRule
+ * Gets or sets keyName of the created AuthorizationRule
*/
- @JsonProperty(value = "keyName")
+ @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY)
private String keyName;
/**
- * Get the primaryConnectionString property: PrimaryConnectionString of the AuthorizationRule.
- *
- * @return the primaryConnectionString value.
+ * Creates an instance of ResourceListKeysInner class.
*/
- public String primaryConnectionString() {
- return this.primaryConnectionString;
+ public ResourceListKeysInner() {
}
/**
- * Set the primaryConnectionString property: PrimaryConnectionString of the AuthorizationRule.
- *
- * @param primaryConnectionString the primaryConnectionString value to set.
- * @return the ResourceListKeysInner object itself.
+ * Get the primaryConnectionString property: Gets or sets primaryConnectionString of the AuthorizationRule.
+ *
+ * @return the primaryConnectionString value.
*/
- public ResourceListKeysInner withPrimaryConnectionString(String primaryConnectionString) {
- this.primaryConnectionString = primaryConnectionString;
- return this;
+ public String primaryConnectionString() {
+ return this.primaryConnectionString;
}
/**
- * Get the secondaryConnectionString property: SecondaryConnectionString of the created AuthorizationRule.
- *
+ * Get the secondaryConnectionString property: Gets or sets secondaryConnectionString of the created
+ * AuthorizationRule.
+ *
* @return the secondaryConnectionString value.
*/
public String secondaryConnectionString() {
@@ -74,19 +69,8 @@ public String secondaryConnectionString() {
}
/**
- * Set the secondaryConnectionString property: SecondaryConnectionString of the created AuthorizationRule.
- *
- * @param secondaryConnectionString the secondaryConnectionString value to set.
- * @return the ResourceListKeysInner object itself.
- */
- public ResourceListKeysInner withSecondaryConnectionString(String secondaryConnectionString) {
- this.secondaryConnectionString = secondaryConnectionString;
- return this;
- }
-
- /**
- * Get the primaryKey property: PrimaryKey of the created AuthorizationRule.
- *
+ * Get the primaryKey property: Gets or sets primaryKey of the created AuthorizationRule.
+ *
* @return the primaryKey value.
*/
public String primaryKey() {
@@ -94,19 +78,8 @@ public String primaryKey() {
}
/**
- * Set the primaryKey property: PrimaryKey of the created AuthorizationRule.
- *
- * @param primaryKey the primaryKey value to set.
- * @return the ResourceListKeysInner object itself.
- */
- public ResourceListKeysInner withPrimaryKey(String primaryKey) {
- this.primaryKey = primaryKey;
- return this;
- }
-
- /**
- * Get the secondaryKey property: SecondaryKey of the created AuthorizationRule.
- *
+ * Get the secondaryKey property: Gets or sets secondaryKey of the created AuthorizationRule.
+ *
* @return the secondaryKey value.
*/
public String secondaryKey() {
@@ -114,39 +87,17 @@ public String secondaryKey() {
}
/**
- * Set the secondaryKey property: SecondaryKey of the created AuthorizationRule.
- *
- * @param secondaryKey the secondaryKey value to set.
- * @return the ResourceListKeysInner object itself.
- */
- public ResourceListKeysInner withSecondaryKey(String secondaryKey) {
- this.secondaryKey = secondaryKey;
- return this;
- }
-
- /**
- * Get the keyName property: KeyName of the created AuthorizationRule.
- *
+ * Get the keyName property: Gets or sets keyName of the created AuthorizationRule.
+ *
* @return the keyName value.
*/
public String keyName() {
return this.keyName;
}
- /**
- * Set the keyName property: KeyName of the created AuthorizationRule.
- *
- * @param keyName the keyName value to set.
- * @return the ResourceListKeysInner object itself.
- */
- public ResourceListKeysInner withKeyName(String keyName) {
- this.keyName = keyName;
- return this;
- }
-
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleProperties.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleProperties.java
deleted file mode 100644
index dc180123e376..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleProperties.java
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.AccessRights;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** SharedAccessAuthorizationRule properties. */
-@Fluent
-public final class SharedAccessAuthorizationRuleProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRuleProperties.class);
-
- /*
- * The rights associated with the rule.
- */
- @JsonProperty(value = "rights")
- private List rights;
-
- /*
- * A base64-encoded 256-bit primary key for signing and validating the SAS
- * token.
- */
- @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
- private String primaryKey;
-
- /*
- * A base64-encoded 256-bit primary key for signing and validating the SAS
- * token.
- */
- @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY)
- private String secondaryKey;
-
- /*
- * A string that describes the authorization rule.
- */
- @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY)
- private String keyName;
-
- /*
- * A string that describes the claim type
- */
- @JsonProperty(value = "claimType", access = JsonProperty.Access.WRITE_ONLY)
- private String claimType;
-
- /*
- * A string that describes the claim value
- */
- @JsonProperty(value = "claimValue", access = JsonProperty.Access.WRITE_ONLY)
- private String claimValue;
-
- /*
- * The last modified time for this rule
- */
- @JsonProperty(value = "modifiedTime", access = JsonProperty.Access.WRITE_ONLY)
- private String modifiedTime;
-
- /*
- * The created time for this rule
- */
- @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY)
- private String createdTime;
-
- /*
- * The revision number for the rule
- */
- @JsonProperty(value = "revision", access = JsonProperty.Access.WRITE_ONLY)
- private Integer revision;
-
- /**
- * Get the rights property: The rights associated with the rule.
- *
- * @return the rights value.
- */
- public List rights() {
- return this.rights;
- }
-
- /**
- * Set the rights property: The rights associated with the rule.
- *
- * @param rights the rights value to set.
- * @return the SharedAccessAuthorizationRuleProperties object itself.
- */
- public SharedAccessAuthorizationRuleProperties withRights(List rights) {
- this.rights = rights;
- return this;
- }
-
- /**
- * Get the primaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token.
- *
- * @return the primaryKey value.
- */
- public String primaryKey() {
- return this.primaryKey;
- }
-
- /**
- * Get the secondaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token.
- *
- * @return the secondaryKey value.
- */
- public String secondaryKey() {
- return this.secondaryKey;
- }
-
- /**
- * Get the keyName property: A string that describes the authorization rule.
- *
- * @return the keyName value.
- */
- public String keyName() {
- return this.keyName;
- }
-
- /**
- * Get the claimType property: A string that describes the claim type.
- *
- * @return the claimType value.
- */
- public String claimType() {
- return this.claimType;
- }
-
- /**
- * Get the claimValue property: A string that describes the claim value.
- *
- * @return the claimValue value.
- */
- public String claimValue() {
- return this.claimValue;
- }
-
- /**
- * Get the modifiedTime property: The last modified time for this rule.
- *
- * @return the modifiedTime value.
- */
- public String modifiedTime() {
- return this.modifiedTime;
- }
-
- /**
- * Get the createdTime property: The created time for this rule.
- *
- * @return the createdTime value.
- */
- public String createdTime() {
- return this.createdTime;
- }
-
- /**
- * Get the revision property: The revision number for the rule.
- *
- * @return the revision value.
- */
- public Integer revision() {
- return this.revision;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleResourceInner.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleResourceInner.java
index c0c3bbbe4f9e..6257be348841 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleResourceInner.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/SharedAccessAuthorizationRuleResourceInner.java
@@ -5,181 +5,127 @@
package com.azure.resourcemanager.notificationhubs.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.notificationhubs.models.AccessRights;
-import com.azure.resourcemanager.notificationhubs.models.Sku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
import java.util.Map;
-/** Description of a Namespace AuthorizationRules. */
+/**
+ * Response for POST requests that return single SharedAccessAuthorizationRule.
+ */
@Fluent
-public final class SharedAccessAuthorizationRuleResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedAccessAuthorizationRuleResourceInner.class);
-
+public final class SharedAccessAuthorizationRuleResourceInner extends ProxyResource {
/*
- * Properties of the Namespace AuthorizationRule.
+ * SharedAccessAuthorizationRule properties.
*/
@JsonProperty(value = "properties")
- private SharedAccessAuthorizationRuleProperties innerProperties;
+ private SharedAccessAuthorizationRuleProperties properties;
/*
- * The sku of the created namespace
+ * Deprecated - only for compatibility.
*/
- @JsonProperty(value = "sku")
- private Sku sku;
+ @JsonProperty(value = "location")
+ private String location;
- /**
- * Get the innerProperties property: Properties of the Namespace AuthorizationRule.
- *
- * @return the innerProperties value.
+ /*
+ * Deprecated - only for compatibility.
*/
- private SharedAccessAuthorizationRuleProperties innerProperties() {
- return this.innerProperties;
- }
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
- /**
- * Get the sku property: The sku of the created namespace.
- *
- * @return the sku value.
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- public Sku sku() {
- return this.sku;
- }
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
- * Set the sku property: The sku of the created namespace.
- *
- * @param sku the sku value to set.
- * @return the SharedAccessAuthorizationRuleResourceInner object itself.
+ * Creates an instance of SharedAccessAuthorizationRuleResourceInner class.
*/
- public SharedAccessAuthorizationRuleResourceInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public SharedAccessAuthorizationRuleResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public SharedAccessAuthorizationRuleResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ public SharedAccessAuthorizationRuleResourceInner() {
}
/**
- * Get the rights property: The rights associated with the rule.
- *
- * @return the rights value.
+ * Get the properties property: SharedAccessAuthorizationRule properties.
+ *
+ * @return the properties value.
*/
- public List rights() {
- return this.innerProperties() == null ? null : this.innerProperties().rights();
+ public SharedAccessAuthorizationRuleProperties properties() {
+ return this.properties;
}
/**
- * Set the rights property: The rights associated with the rule.
- *
- * @param rights the rights value to set.
+ * Set the properties property: SharedAccessAuthorizationRule properties.
+ *
+ * @param properties the properties value to set.
* @return the SharedAccessAuthorizationRuleResourceInner object itself.
*/
- public SharedAccessAuthorizationRuleResourceInner withRights(List rights) {
- if (this.innerProperties() == null) {
- this.innerProperties = new SharedAccessAuthorizationRuleProperties();
- }
- this.innerProperties().withRights(rights);
+ public SharedAccessAuthorizationRuleResourceInner
+ withProperties(SharedAccessAuthorizationRuleProperties properties) {
+ this.properties = properties;
return this;
}
/**
- * Get the primaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token.
- *
- * @return the primaryKey value.
+ * Get the location property: Deprecated - only for compatibility.
+ *
+ * @return the location value.
*/
- public String primaryKey() {
- return this.innerProperties() == null ? null : this.innerProperties().primaryKey();
+ public String location() {
+ return this.location;
}
/**
- * Get the secondaryKey property: A base64-encoded 256-bit primary key for signing and validating the SAS token.
- *
- * @return the secondaryKey value.
- */
- public String secondaryKey() {
- return this.innerProperties() == null ? null : this.innerProperties().secondaryKey();
- }
-
- /**
- * Get the keyName property: A string that describes the authorization rule.
- *
- * @return the keyName value.
- */
- public String keyName() {
- return this.innerProperties() == null ? null : this.innerProperties().keyName();
- }
-
- /**
- * Get the claimType property: A string that describes the claim type.
- *
- * @return the claimType value.
- */
- public String claimType() {
- return this.innerProperties() == null ? null : this.innerProperties().claimType();
- }
-
- /**
- * Get the claimValue property: A string that describes the claim value.
- *
- * @return the claimValue value.
+ * Set the location property: Deprecated - only for compatibility.
+ *
+ * @param location the location value to set.
+ * @return the SharedAccessAuthorizationRuleResourceInner object itself.
*/
- public String claimValue() {
- return this.innerProperties() == null ? null : this.innerProperties().claimValue();
+ public SharedAccessAuthorizationRuleResourceInner withLocation(String location) {
+ this.location = location;
+ return this;
}
/**
- * Get the modifiedTime property: The last modified time for this rule.
- *
- * @return the modifiedTime value.
+ * Get the tags property: Deprecated - only for compatibility.
+ *
+ * @return the tags value.
*/
- public String modifiedTime() {
- return this.innerProperties() == null ? null : this.innerProperties().modifiedTime();
+ public Map tags() {
+ return this.tags;
}
/**
- * Get the createdTime property: The created time for this rule.
- *
- * @return the createdTime value.
+ * Set the tags property: Deprecated - only for compatibility.
+ *
+ * @param tags the tags value to set.
+ * @return the SharedAccessAuthorizationRuleResourceInner object itself.
*/
- public String createdTime() {
- return this.innerProperties() == null ? null : this.innerProperties().createdTime();
+ public SharedAccessAuthorizationRuleResourceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
}
/**
- * Get the revision property: The revision number for the rule.
- *
- * @return the revision value.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
*/
- public Integer revision() {
- return this.innerProperties() == null ? null : this.innerProperties().revision();
+ public SystemData systemData() {
+ return this.systemData;
}
/**
* Validates the instance.
- *
+ *
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- if (sku() != null) {
- sku().validate();
+ if (properties() != null) {
+ properties().validate();
}
}
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/WnsCredentialProperties.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/WnsCredentialProperties.java
deleted file mode 100644
index 2543b327d496..000000000000
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/WnsCredentialProperties.java
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.notificationhubs.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Description of a NotificationHub WnsCredential. */
-@Fluent
-public final class WnsCredentialProperties {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(WnsCredentialProperties.class);
-
- /*
- * The package ID for this credential.
- */
- @JsonProperty(value = "packageSid")
- private String packageSid;
-
- /*
- * The secret key.
- */
- @JsonProperty(value = "secretKey")
- private String secretKey;
-
- /*
- * The Windows Live endpoint.
- */
- @JsonProperty(value = "windowsLiveEndpoint")
- private String windowsLiveEndpoint;
-
- /**
- * Get the packageSid property: The package ID for this credential.
- *
- * @return the packageSid value.
- */
- public String packageSid() {
- return this.packageSid;
- }
-
- /**
- * Set the packageSid property: The package ID for this credential.
- *
- * @param packageSid the packageSid value to set.
- * @return the WnsCredentialProperties object itself.
- */
- public WnsCredentialProperties withPackageSid(String packageSid) {
- this.packageSid = packageSid;
- return this;
- }
-
- /**
- * Get the secretKey property: The secret key.
- *
- * @return the secretKey value.
- */
- public String secretKey() {
- return this.secretKey;
- }
-
- /**
- * Set the secretKey property: The secret key.
- *
- * @param secretKey the secretKey value to set.
- * @return the WnsCredentialProperties object itself.
- */
- public WnsCredentialProperties withSecretKey(String secretKey) {
- this.secretKey = secretKey;
- return this;
- }
-
- /**
- * Get the windowsLiveEndpoint property: The Windows Live endpoint.
- *
- * @return the windowsLiveEndpoint value.
- */
- public String windowsLiveEndpoint() {
- return this.windowsLiveEndpoint;
- }
-
- /**
- * Set the windowsLiveEndpoint property: The Windows Live endpoint.
- *
- * @param windowsLiveEndpoint the windowsLiveEndpoint value to set.
- * @return the WnsCredentialProperties object itself.
- */
- public WnsCredentialProperties withWindowsLiveEndpoint(String windowsLiveEndpoint) {
- this.windowsLiveEndpoint = windowsLiveEndpoint;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/package-info.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/package-info.java
index 19cb916a17da..db55bc8657e5 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/package-info.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/models/package-info.java
@@ -2,5 +2,8 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-/** Package containing the inner data models for NotificationHubsManagementClient. Azure NotificationHub client. */
+/**
+ * Package containing the inner data models for NotificationHubsRPClient.
+ * Microsoft Notification Hubs Resource Provider REST API.
+ */
package com.azure.resourcemanager.notificationhubs.fluent.models;
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/package-info.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/package-info.java
index db5c8de53046..4d9193cbc5a3 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/package-info.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/package-info.java
@@ -2,5 +2,8 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-/** Package containing the service clients for NotificationHubsManagementClient. Azure NotificationHub client. */
+/**
+ * Package containing the service clients for NotificationHubsRPClient.
+ * Microsoft Notification Hubs Resource Provider REST API.
+ */
package com.azure.resourcemanager.notificationhubs.fluent;
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/CheckAvailabilityResultImpl.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/CheckAvailabilityResultImpl.java
index 224104917636..8d22da60d7eb 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/CheckAvailabilityResultImpl.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/CheckAvailabilityResultImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.notificationhubs.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.notificationhubs.fluent.models.CheckAvailabilityResultInner;
import com.azure.resourcemanager.notificationhubs.models.CheckAvailabilityResult;
import com.azure.resourcemanager.notificationhubs.models.Sku;
@@ -15,8 +16,7 @@ public final class CheckAvailabilityResultImpl implements CheckAvailabilityResul
private final com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager;
- CheckAvailabilityResultImpl(
- CheckAvailabilityResultInner innerObject,
+ CheckAvailabilityResultImpl(CheckAvailabilityResultInner innerObject,
com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
@@ -34,6 +34,10 @@ public String type() {
return this.innerModel().type();
}
+ public Boolean isAvailiable() {
+ return this.innerModel().isAvailiable();
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -47,14 +51,14 @@ public Map tags() {
}
}
- public Boolean isAvailiable() {
- return this.innerModel().isAvailiable();
- }
-
public Sku sku() {
return this.innerModel().sku();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public CheckAvailabilityResultInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/DebugSendResponseImpl.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/DebugSendResponseImpl.java
index bcf2fa40e4d2..1009e914fd78 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/DebugSendResponseImpl.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/DebugSendResponseImpl.java
@@ -4,9 +4,10 @@
package com.azure.resourcemanager.notificationhubs.implementation;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.notificationhubs.fluent.models.DebugSendResponseInner;
import com.azure.resourcemanager.notificationhubs.models.DebugSendResponse;
-import com.azure.resourcemanager.notificationhubs.models.Sku;
+import com.azure.resourcemanager.notificationhubs.models.DebugSendResult;
import java.util.Collections;
import java.util.Map;
@@ -15,8 +16,7 @@ public final class DebugSendResponseImpl implements DebugSendResponse {
private final com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager;
- DebugSendResponseImpl(
- DebugSendResponseInner innerObject,
+ DebugSendResponseImpl(DebugSendResponseInner innerObject,
com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
@@ -34,6 +34,10 @@ public String type() {
return this.innerModel().type();
}
+ public DebugSendResult properties() {
+ return this.innerModel().properties();
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -47,20 +51,8 @@ public Map tags() {
}
}
- public Sku sku() {
- return this.innerModel().sku();
- }
-
- public Float success() {
- return this.innerModel().success();
- }
-
- public Float failure() {
- return this.innerModel().failure();
- }
-
- public Object results() {
- return this.innerModel().results();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
public DebugSendResponseInner innerModel() {
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespaceResourceImpl.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespaceResourceImpl.java
index cf7c11dbcab0..c4ffad0e87f7 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespaceResourceImpl.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespaceResourceImpl.java
@@ -4,15 +4,16 @@
package com.azure.resourcemanager.notificationhubs.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.notificationhubs.fluent.models.NamespaceResourceInner;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceCreateOrUpdateParameters;
import com.azure.resourcemanager.notificationhubs.models.NamespacePatchParameters;
+import com.azure.resourcemanager.notificationhubs.models.NamespaceProperties;
import com.azure.resourcemanager.notificationhubs.models.NamespaceResource;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceType;
+import com.azure.resourcemanager.notificationhubs.models.PnsCredentialsResource;
import com.azure.resourcemanager.notificationhubs.models.Sku;
-import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.Map;
@@ -51,60 +52,24 @@ public Sku sku() {
return this.innerModel().sku();
}
- public String namePropertiesName() {
- return this.innerModel().namePropertiesName();
+ public NamespaceProperties properties() {
+ return this.innerModel().properties();
}
- public String provisioningState() {
- return this.innerModel().provisioningState();
+ public SystemData systemData() {
+ return this.innerModel().systemData();
}
- public String region() {
- return this.innerModel().region();
+ public Region region() {
+ return Region.fromName(this.regionName());
}
- public String metricId() {
- return this.innerModel().metricId();
+ public String regionName() {
+ return this.location();
}
- public String status() {
- return this.innerModel().status();
- }
-
- public OffsetDateTime createdAt() {
- return this.innerModel().createdAt();
- }
-
- public OffsetDateTime updatedAt() {
- return this.innerModel().updatedAt();
- }
-
- public String serviceBusEndpoint() {
- return this.innerModel().serviceBusEndpoint();
- }
-
- public String subscriptionId() {
- return this.innerModel().subscriptionId();
- }
-
- public String scaleUnit() {
- return this.innerModel().scaleUnit();
- }
-
- public Boolean enabled() {
- return this.innerModel().enabled();
- }
-
- public Boolean critical() {
- return this.innerModel().critical();
- }
-
- public String dataCenter() {
- return this.innerModel().dataCenter();
- }
-
- public NamespaceType namespaceType() {
- return this.innerModel().namespaceType();
+ public String resourceGroupName() {
+ return resourceGroupName;
}
public NamespaceResourceInner innerModel() {
@@ -119,8 +84,6 @@ private com.azure.resourcemanager.notificationhubs.NotificationHubsManager manag
private String namespaceName;
- private NamespaceCreateOrUpdateParameters createParameters;
-
private NamespacePatchParameters updateParameters;
public NamespaceResourceImpl withExistingResourceGroup(String resourceGroupName) {
@@ -129,31 +92,22 @@ public NamespaceResourceImpl withExistingResourceGroup(String resourceGroupName)
}
public NamespaceResource create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .createOrUpdateWithResponse(resourceGroupName, namespaceName, createParameters, Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces().createOrUpdate(resourceGroupName,
+ namespaceName, this.innerModel(), Context.NONE);
return this;
}
public NamespaceResource create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .createOrUpdateWithResponse(resourceGroupName, namespaceName, createParameters, context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces().createOrUpdate(resourceGroupName,
+ namespaceName, this.innerModel(), context);
return this;
}
- NamespaceResourceImpl(
- String name, com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager) {
+ NamespaceResourceImpl(String name,
+ com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager) {
this.innerObject = new NamespaceResourceInner();
this.serviceManager = serviceManager;
this.namespaceName = name;
- this.createParameters = new NamespaceCreateOrUpdateParameters();
}
public NamespaceResourceImpl update() {
@@ -162,147 +116,83 @@ public NamespaceResourceImpl update() {
}
public NamespaceResource apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .patchWithResponse(resourceGroupName, namespaceName, updateParameters, Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces()
+ .updateWithResponse(resourceGroupName, namespaceName, updateParameters, Context.NONE).getValue();
return this;
}
public NamespaceResource apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .patchWithResponse(resourceGroupName, namespaceName, updateParameters, context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces()
+ .updateWithResponse(resourceGroupName, namespaceName, updateParameters, context).getValue();
return this;
}
- NamespaceResourceImpl(
- NamespaceResourceInner innerObject,
+ NamespaceResourceImpl(NamespaceResourceInner innerObject,
com.azure.resourcemanager.notificationhubs.NotificationHubsManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "namespaces");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.namespaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "namespaces");
}
public NamespaceResource refresh() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces()
+ .getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue();
return this;
}
public NamespaceResource refresh(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getNamespaces()
- .getByResourceGroupWithResponse(resourceGroupName, namespaceName, context)
- .getValue();
+ this.innerObject = serviceManager.serviceClient().getNamespaces()
+ .getByResourceGroupWithResponse(resourceGroupName, namespaceName, context).getValue();
return this;
}
- public NamespaceResourceImpl withLocation(Region location) {
- this.createParameters.withLocation(location.toString());
+ public Response getPnsCredentialsWithResponse(Context context) {
+ return serviceManager.namespaces().getPnsCredentialsWithResponse(resourceGroupName, namespaceName, context);
+ }
+
+ public PnsCredentialsResource getPnsCredentials() {
+ return serviceManager.namespaces().getPnsCredentials(resourceGroupName, namespaceName);
+ }
+
+ public NamespaceResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
return this;
}
- public NamespaceResourceImpl withLocation(String location) {
- this.createParameters.withLocation(location);
+ public NamespaceResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
return this;
}
- public NamespaceResourceImpl withTags(Map tags) {
+ public NamespaceResourceImpl withSku(Sku sku) {
if (isInCreateMode()) {
- this.createParameters.withTags(tags);
+ this.innerModel().withSku(sku);
return this;
} else {
- this.updateParameters.withTags(tags);
+ this.updateParameters.withSku(sku);
return this;
}
}
- public NamespaceResourceImpl withSku(Sku sku) {
+ public NamespaceResourceImpl withTags(Map tags) {
if (isInCreateMode()) {
- this.createParameters.withSku(sku);
+ this.innerModel().withTags(tags);
return this;
} else {
- this.updateParameters.withSku(sku);
+ this.updateParameters.withTags(tags);
return this;
}
}
- public NamespaceResourceImpl withNamePropertiesName(String namePropertiesName) {
- this.createParameters.withNamePropertiesName(namePropertiesName);
- return this;
- }
-
- public NamespaceResourceImpl withProvisioningState(String provisioningState) {
- this.createParameters.withProvisioningState(provisioningState);
- return this;
- }
-
- public NamespaceResourceImpl withRegion(String region) {
- this.createParameters.withRegion(region);
- return this;
- }
-
- public NamespaceResourceImpl withStatus(String status) {
- this.createParameters.withStatus(status);
- return this;
- }
-
- public NamespaceResourceImpl withCreatedAt(OffsetDateTime createdAt) {
- this.createParameters.withCreatedAt(createdAt);
- return this;
- }
-
- public NamespaceResourceImpl withUpdatedAt(OffsetDateTime updatedAt) {
- this.createParameters.withUpdatedAt(updatedAt);
- return this;
- }
-
- public NamespaceResourceImpl withServiceBusEndpoint(String serviceBusEndpoint) {
- this.createParameters.withServiceBusEndpoint(serviceBusEndpoint);
- return this;
- }
-
- public NamespaceResourceImpl withSubscriptionId(String subscriptionId) {
- this.createParameters.withSubscriptionId(subscriptionId);
- return this;
- }
-
- public NamespaceResourceImpl withScaleUnit(String scaleUnit) {
- this.createParameters.withScaleUnit(scaleUnit);
- return this;
- }
-
- public NamespaceResourceImpl withEnabled(Boolean enabled) {
- this.createParameters.withEnabled(enabled);
- return this;
- }
-
- public NamespaceResourceImpl withCritical(Boolean critical) {
- this.createParameters.withCritical(critical);
- return this;
- }
-
- public NamespaceResourceImpl withDataCenter(String dataCenter) {
- this.createParameters.withDataCenter(dataCenter);
- return this;
- }
-
- public NamespaceResourceImpl withNamespaceType(NamespaceType namespaceType) {
- this.createParameters.withNamespaceType(namespaceType);
- return this;
+ public NamespaceResourceImpl withProperties(NamespaceProperties properties) {
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateParameters.withProperties(properties);
+ return this;
+ }
}
private boolean isInCreateMode() {
diff --git a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespacesClientImpl.java b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespacesClientImpl.java
index 98023acf2c61..f97632e8971c 100644
--- a/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespacesClientImpl.java
+++ b/sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/implementation/NamespacesClientImpl.java
@@ -31,302 +31,238 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.notificationhubs.fluent.NamespacesClient;
import com.azure.resourcemanager.notificationhubs.fluent.models.CheckAvailabilityResultInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.NamespaceResourceInner;
+import com.azure.resourcemanager.notificationhubs.fluent.models.PnsCredentialsResourceInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.ResourceListKeysInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.SharedAccessAuthorizationRuleResourceInner;
import com.azure.resourcemanager.notificationhubs.models.CheckAvailabilityParameters;
-import com.azure.resourcemanager.notificationhubs.models.NamespaceCreateOrUpdateParameters;
import com.azure.resourcemanager.notificationhubs.models.NamespaceListResult;
import com.azure.resourcemanager.notificationhubs.models.NamespacePatchParameters;
-import com.azure.resourcemanager.notificationhubs.models.PolicykeyResource;
-import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters;
+import com.azure.resourcemanager.notificationhubs.models.PolicyKeyResource;
import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleListResult;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** An instance of this class provides access to all the operations defined in NamespacesClient. */
+/**
+ * An instance of this class provides access to all the operations defined in NamespacesClient.
+ */
public final class NamespacesClientImpl implements NamespacesClient {
- private final ClientLogger logger = new ClientLogger(NamespacesClientImpl.class);
-
- /** The proxy service used to perform REST calls. */
+ /**
+ * The proxy service used to perform REST calls.
+ */
private final NamespacesService service;
- /** The service client containing this operation class. */
- private final NotificationHubsManagementClientImpl client;
+ /**
+ * The service client containing this operation class.
+ */
+ private final NotificationHubsRPClientImpl client;
/**
* Initializes an instance of NamespacesClientImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
- NamespacesClientImpl(NotificationHubsManagementClientImpl client) {
- this.service =
- RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ NamespacesClientImpl(NotificationHubsRPClientImpl client) {
+ this.service
+ = RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for NotificationHubsManagementClientNamespaces to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for NotificationHubsRPClientNamespaces to be used by the proxy service
+ * to perform REST calls.
*/
@Host("{$host}")
- @ServiceInterface(name = "NotificationHubsMana")
- private interface NamespacesService {
- @Headers({"Content-Type: application/json"})
+ @ServiceInterface(name = "NotificationHubsRPCl")
+ public interface NamespacesService {
+ @Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> checkAvailability(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") CheckAvailabilityParameters parameters,
- @HeaderParam("Accept") String accept,
+ Mono> checkAvailability(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") CheckAvailabilityParameters parameters, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}")
- @ExpectedResponses({200, 201})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdate(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @QueryParam("api-version") String apiVersion,
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") NamespaceCreateOrUpdateParameters parameters,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> patch(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @QueryParam("api-version") String apiVersion,
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") NamespacePatchParameters parameters,
- @HeaderParam("Accept") String accept,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NamespaceResourceInner parameters, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}")
- @ExpectedResponses({200, 202, 204})
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @QueryParam("api-version") String apiVersion,
+ Mono> update(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") NamespacePatchParameters parameters, @HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}")
+ @ExpectedResponses({ 200, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @QueryParam("api-version") String apiVersion,
+ Mono> delete(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> createOrUpdateAuthorizationRule(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @PathParam("authorizationRuleName") String authorizationRuleName,
- @QueryParam("api-version") String apiVersion,
+ Mono> list(@HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("$skipToken") String skipToken,
+ @QueryParam("$top") Integer top, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skipToken") String skipToken,
+ @QueryParam("$top") Integer top, @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
- @ExpectedResponses({200, 204})
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> deleteAuthorizationRule(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
+ Mono> createOrUpdateAuthorizationRule(
+ @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
@PathParam("authorizationRuleName") String authorizationRuleName,
@QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") SharedAccessAuthorizationRuleResourceInner parameters,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> deleteAuthorizationRule(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @PathParam("authorizationRuleName") String authorizationRuleName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getAuthorizationRule(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
+ @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
@PathParam("authorizationRuleName") String authorizationRuleName,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listAuthorizationRules(
+ @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion,
+ Mono> listKeys(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @PathParam("authorizationRuleName") String authorizationRuleName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listAuthorizationRules(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @QueryParam("api-version") String apiVersion,
+ Mono> regenerateKeys(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listKeys(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
@PathParam("authorizationRuleName") String authorizationRuleName,
- @QueryParam("api-version") String apiVersion,
- @PathParam("subscriptionId") String subscriptionId,
- @HeaderParam("Accept") String accept,
- Context context);
+ @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PolicyKeyResource parameters,
+ @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs"
- + "/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys")
- @ExpectedResponses({200})
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/pnsCredentials")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> regenerateKeys(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("namespaceName") String namespaceName,
- @PathParam("authorizationRuleName") String authorizationRuleName,
- @QueryParam("api-version") String apiVersion,
+ Mono> getPnsCredentials(@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
- @BodyParam("application/json") PolicykeyResource parameters,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("namespaceName") String namespaceName,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listAllNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listAllNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
- @Headers({"Content-Type: application/json"})
+ @Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
- @ExpectedResponses({200})
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listAuthorizationRulesNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept,
- Context context);
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
+ *
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> checkAvailabilityWithResponseAsync(
- CheckAvailabilityParameters parameters) {
+ private Mono>
+ checkAvailabilityWithResponseAsync(CheckAvailabilityParameters parameters) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
@@ -335,44 +271,33 @@ private Mono> checkAvailabilityWithRespon
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .checkAvailability(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context))
+ .withContext(context -> service.checkAvailability(this.client.getEndpoint(),
+ this.client.getSubscriptionId(), this.client.getApiVersion(), parameters, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
+ *
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> checkAvailabilityWithResponseAsync(
- CheckAvailabilityParameters parameters, Context context) {
+ private Mono>
+ checkAvailabilityWithResponseAsync(CheckAvailabilityParameters parameters, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
if (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
@@ -381,91 +306,78 @@ private Mono> checkAvailabilityWithRespon
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .checkAvailability(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context);
+ return service.checkAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ this.client.getApiVersion(), parameters, accept, context);
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
+ *
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono checkAvailabilityAsync(CheckAvailabilityParameters parameters) {
- return checkAvailabilityWithResponseAsync(parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ return checkAvailabilityWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
+ *
+ * @param parameters Request content.
+ * @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 description of a CheckAvailability resource.
+ * @return description of a CheckAvailability resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameters parameters) {
- return checkAvailabilityAsync(parameters).block();
+ public Response checkAvailabilityWithResponse(CheckAvailabilityParameters parameters,
+ Context context) {
+ return checkAvailabilityWithResponseAsync(parameters, context).block();
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the
* domain name is created based on the service namespace name.
- *
- * @param parameters The namespace name.
- * @param context The context to associate with this operation.
+ *
+ * @param parameters Request content.
* @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 description of a CheckAvailability resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response checkAvailabilityWithResponse(
- CheckAvailabilityParameters parameters, Context context) {
- return checkAvailabilityWithResponseAsync(parameters, context).block();
+ public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameters parameters) {
+ return checkAvailabilityWithResponse(parameters, Context.NONE).getValue();
}
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) {
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String namespaceName) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -474,55 +386,36 @@ private Mono> createOrUpdateWithResponseAsync(
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
return FluxUtil
.withContext(
- context ->
- service
- .createOrUpdate(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context))
+ context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateWithResponseAsync(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) {
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String namespaceName, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -531,113 +424,82 @@ private Mono> createOrUpdateWithResponseAsync(
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .createOrUpdate(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ namespaceName, this.client.getApiVersion(), accept, context);
}
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) {
- return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ private Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public NamespaceResourceInner createOrUpdate(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) {
- return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block();
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String namespaceName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context).block();
}
/**
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This
- * operation is idempotent.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a Namespace Resource.
- * @param context The context to associate with this operation.
+ * Returns the given namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateWithResponse(
- String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters, Context context) {
- return createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context).block();
+ public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) {
+ return getByResourceGroupWithResponse(resourceGroupName, namespaceName, Context.NONE).getValue();
}
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> patchWithResponseAsync(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) {
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String namespaceName, NamespaceResourceInner parameters) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -646,12 +508,6 @@ private Mono> patchWithResponseAsync(
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
@@ -659,41 +515,34 @@ private Mono> patchWithResponseAsync(
}
final String accept = "application/json";
return FluxUtil
- .withContext(
- context ->
- service
- .patch(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context))
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, namespaceName, this.client.getApiVersion(), parameters, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> patchWithResponseAsync(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters, Context context) {
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String namespaceName, NamespaceResourceInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -702,12 +551,6 @@ private Mono> patchWithResponseAsync(
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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 (parameters == null) {
return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
} else {
@@ -715,319 +558,316 @@ private Mono> patchWithResponseAsync(
}
final String accept = "application/json";
context = this.client.mergeContext(context);
- return service
- .patch(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ namespaceName, this.client.getApiVersion(), parameters, accept, context);
}
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return the {@link PollerFlux} for polling of notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono patchAsync(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) {
- return patchWithResponseAsync(resourceGroupName, namespaceName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NamespaceResourceInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, NamespaceResourceInner parameters) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), NamespaceResourceInner.class, NamespaceResourceInner.class,
+ this.client.getContext());
}
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 description of a Namespace resource.
+ * @return the {@link PollerFlux} for polling of notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public NamespaceResourceInner patch(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) {
- return patchAsync(resourceGroupName, namespaceName, parameters).block();
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, NamespaceResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String namespaceName, NamespaceResourceInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, namespaceName, parameters, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), NamespaceResourceInner.class, NamespaceResourceInner.class, context);
}
/**
- * Patches the existing namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to patch a Namespace Resource.
- * @param context The context to associate with this operation.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 description of a Namespace resource.
+ * @return the {@link SyncPoller} for polling of notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response patchWithResponse(
- String resourceGroupName, String namespaceName, NamespacePatchParameters parameters, Context context) {
- return patchWithResponseAsync(resourceGroupName, namespaceName, parameters, context).block();
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NamespaceResourceInner>
+ beginCreateOrUpdate(String resourceGroupName, String namespaceName, NamespaceResourceInner parameters) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).getSyncPoller();
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 completion.
+ * @return the {@link SyncPoller} for polling of notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String namespaceName) {
- 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 (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName 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."));
- }
- return FluxUtil
- .withContext(
- context ->
- service
- .delete(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, NamespaceResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String namespaceName, NamespaceResourceInner parameters, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).getSyncPoller();
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String namespaceName, 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 (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName 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."));
- }
- context = this.client.mergeContext(context);
- return service
- .delete(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- context);
+ private Mono createOrUpdateAsync(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 completion.
+ * @return notification Hubs Namespace Resource on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String namespaceName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String namespaceName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, namespaceName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, namespaceName, parameters).block();
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 completion.
+ * @return notification Hubs Namespace Resource.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String namespaceName) {
- return beginDeleteAsync(resourceGroupName, namespaceName).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public NamespaceResourceInner createOrUpdate(String resourceGroupName, String namespaceName,
+ NamespaceResourceInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, namespaceName, parameters, context).block();
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(
- String resourceGroupName, String namespaceName, Context context) {
- return beginDeleteAsync(resourceGroupName, namespaceName, context).getSyncPoller();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String namespaceName, NamespacePatchParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (namespaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, namespaceName, this.client.getApiVersion(), parameters, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 completion.
+ * @return notification Hubs Namespace Resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String namespaceName) {
- return beginDeleteAsync(resourceGroupName, namespaceName).last().flatMap(this.client::getLroFinalResultOrError);
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String namespaceName, NamespacePatchParameters parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (namespaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ namespaceName, this.client.getApiVersion(), parameters, accept, context);
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String namespaceName, Context context) {
- return beginDeleteAsync(resourceGroupName, namespaceName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private Mono updateAsync(String resourceGroupName, String namespaceName,
+ NamespacePatchParameters parameters) {
+ return updateWithResponseAsync(resourceGroupName, namespaceName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
+ * @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 notification Hubs Namespace Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String namespaceName) {
- deleteAsync(resourceGroupName, namespaceName).block();
+ public Response updateWithResponse(String resourceGroupName, String namespaceName,
+ NamespacePatchParameters parameters, Context context) {
+ return updateWithResponseAsync(resourceGroupName, namespaceName, parameters, context).block();
}
/**
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Patches the existing namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param parameters Request content.
* @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 notification Hubs Namespace Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String namespaceName, Context context) {
- deleteAsync(resourceGroupName, namespaceName, context).block();
+ public NamespaceResourceInner update(String resourceGroupName, String namespaceName,
+ NamespacePatchParameters parameters) {
+ return updateWithResponse(resourceGroupName, namespaceName, parameters, Context.NONE).getValue();
}
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String namespaceName) {
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -1036,47 +876,34 @@ private Mono> getByResourceGroupWithResponseAsy
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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
- .getByResourceGroup(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, namespaceName, this.client.getApiVersion(), accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String namespaceName, Context context) {
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String namespaceName,
+ Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
@@ -1085,458 +912,383 @@ private Mono> getByResourceGroupWithResponseAsy
if (namespaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter namespaceName 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
- .getByResourceGroup(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context);
+ return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ namespaceName, this.client.getApiVersion(), accept, context);
}
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String namespaceName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ private Mono deleteAsync(String resourceGroupName, String namespaceName) {
+ return deleteWithResponseAsync(resourceGroupName, namespaceName).flatMap(ignored -> Mono.empty());
}
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @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 description of a Namespace resource.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public NamespaceResourceInner getByResourceGroup(String resourceGroupName, String namespaceName) {
- return getByResourceGroupAsync(resourceGroupName, namespaceName).block();
+ public Response deleteWithResponse(String resourceGroupName, String namespaceName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, namespaceName, context).block();
}
/**
- * Returns the description for the specified namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param context The context to associate with this operation.
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
* @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 description of a Namespace resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String namespaceName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, namespaceName, context).block();
+ public void delete(String resourceGroupName, String namespaceName) {
+ deleteWithResponse(resourceGroupName, namespaceName, Context.NONE);
}
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateAuthorizationRuleWithResponseAsync(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) {
+ private Mono> listSinglePageAsync(String skipToken, Integer top) {
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 (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
- }
- if (authorizationRuleName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
+ 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
- .createOrUpdateAuthorizationRule(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- authorizationRuleName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), skipToken,
+ top, 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()));
}
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createOrUpdateAuthorizationRuleWithResponseAsync(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
+ private Mono> listSinglePageAsync(String skipToken, Integer top,
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 (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
- }
- if (authorizationRuleName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
+ 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
- .createOrUpdateAuthorizationRule(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- authorizationRuleName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- parameters,
- accept,
- context);
+ .list(this.client.getEndpoint(), this.client.getSubscriptionId(), skipToken, top,
+ this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAuthorizationRuleAsync(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) {
- return createOrUpdateAuthorizationRuleWithResponseAsync(
- resourceGroupName, namespaceName, authorizationRuleName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String skipToken, Integer top) {
+ return new PagedFlux<>(() -> listSinglePageAsync(skipToken, top),
+ nextLink -> listAllNextSinglePageAsync(nextLink));
}
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @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 of the List Namespace operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final String skipToken = null;
+ final Integer top = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(skipToken, top),
+ nextLink -> listAllNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
+ * @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) {
- return createOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters)
- .block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String skipToken, Integer top, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(skipToken, top, context),
+ nextLink -> listAllNextSinglePageAsync(nextLink, context));
}
/**
- * Creates an authorization rule for a namespace.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
- * @param parameters The shared access authorization rule.
+ * Lists all the available namespaces within the subscription.
+ *
+ * @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 of the List Namespace operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final String skipToken = null;
+ final Integer top = null;
+ return new PagedIterable<>(listAsync(skipToken, top));
+ }
+
+ /**
+ * Lists all the available namespaces within the subscription.
+ *
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 description of a Namespace AuthorizationRules.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateAuthorizationRuleWithResponse(
- String resourceGroupName,
- String namespaceName,
- String authorizationRuleName,
- SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
- Context context) {
- return createOrUpdateAuthorizationRuleWithResponseAsync(
- resourceGroupName, namespaceName, authorizationRuleName, parameters, context)
- .block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String skipToken, Integer top, Context context) {
+ return new PagedIterable<>(listAsync(skipToken, top, context));
}
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 response of the List Namespace operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteAuthorizationRuleWithResponseAsync(
- String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ String skipToken, Integer top) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
- }
- if (authorizationRuleName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter authorizationRuleName 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
- .deleteAuthorizationRule(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- authorizationRuleName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- context))
+ context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, skipToken, top, 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()));
}
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 completion.
+ * @return the response of the List Namespace operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> deleteAuthorizationRuleWithResponseAsync(
- String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) {
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ String skipToken, Integer top, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (resourceGroupName == null) {
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (namespaceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null."));
- }
- if (authorizationRuleName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter authorizationRuleName 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
- .deleteAuthorizationRule(
- this.client.getEndpoint(),
- resourceGroupName,
- namespaceName,
- authorizationRuleName,
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- context);
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ skipToken, top, this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
}
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 response of the List Namespace operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAuthorizationRuleAsync(
- String resourceGroupName, String namespaceName, String authorizationRuleName) {
- return deleteAuthorizationRuleWithResponseAsync(resourceGroupName, namespaceName, authorizationRuleName)
- .flatMap((Response res) -> Mono.empty());
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken,
+ Integer top) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, top),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 of the List Namespace operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) {
- deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final String skipToken = null;
+ final Integer top = null;
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, top),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Deletes a namespace authorization rule.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization Rule Name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
* @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 response.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteAuthorizationRuleWithResponse(
- String resourceGroupName, String namespaceName, String authorizationRuleName, Context context) {
- return deleteAuthorizationRuleWithResponseAsync(
- resourceGroupName, namespaceName, authorizationRuleName, context)
- .block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken,
+ Integer top, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, top, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
}
/**
- * Gets an authorization rule for a namespace by name.
- *
- * @param resourceGroupName The name of the resource group.
- * @param namespaceName The namespace name.
- * @param authorizationRuleName Authorization rule name.
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 authorization rule for a namespace by name.
+ * @return the response of the List Namespace operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ final String skipToken = null;
+ final Integer top = null;
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken, top));
+ }
+
+ /**
+ * Lists the available namespaces within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken Skip token for subsequent requests.
+ * @param top Maximum number of results to return.
+ * @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 response of the List Namespace operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken,
+ Integer top, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken, top, context));
+ }
+
+ /**
+ * Creates an authorization rule for a namespace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param namespaceName Namespace name.
+ * @param authorizationRuleName Authorization Rule Name.
+ * @param parameters Request content.
+ * @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 response for POST requests that return single SharedAccessAuthorizationRule along with {@link Response}
+ * on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono