diff --git a/sdk/signalr/mgmt-v2018_10_01/pom.xml b/sdk/signalr/mgmt-v2018_10_01/pom.xml index 05047378920b..50b4fbaa4c4a 100644 --- a/sdk/signalr/mgmt-v2018_10_01/pom.xml +++ b/sdk/signalr/mgmt-v2018_10_01/pom.xml @@ -11,10 +11,10 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml - azure-mgmt-signalr + azure-mgmt-signalrservice 1.0.0-beta jar Microsoft Azure SDK for SignalRService Management diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ACLAction.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ACLAction.java new file mode 100644 index 000000000000..49c40d6f95f4 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ACLAction.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ACLAction. + */ +public final class ACLAction extends ExpandableStringEnum { + /** Static value Allow for ACLAction. */ + public static final ACLAction ALLOW = fromString("Allow"); + + /** Static value Deny for ACLAction. */ + public static final ACLAction DENY = fromString("Deny"); + + /** + * Creates or finds a ACLAction from its string representation. + * @param name a name to look for + * @return the corresponding ACLAction + */ + @JsonCreator + public static ACLAction fromString(String name) { + return fromString(name, ACLAction.class); + } + + /** + * @return known ACLAction values + */ + public static Collection values() { + return values(ACLAction.class); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java new file mode 100644 index 000000000000..c7e895316c99 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponse.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contains information about an API error. + */ +public class ErrorResponse { + /** + * Describes a particular API error with an error code and a message. + */ + @JsonProperty(value = "error") + private ErrorResponseBody error; + + /** + * Get describes a particular API error with an error code and a message. + * + * @return the error value + */ + public ErrorResponseBody error() { + return this.error; + } + + /** + * Set describes a particular API error with an error code and a message. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorResponseBody error) { + this.error = error; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java new file mode 100644 index 000000000000..91a0c9c0a070 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseBody.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes a particular API error with an error code and a message. + */ +public class ErrorResponseBody { + /** + * An error code that describes the error condition more precisely than an + * HTTP status code. + * Can be used to programmatically handle specific error cases. + */ + @JsonProperty(value = "code", required = true) + private String code; + + /** + * A message that describes the error in detail and provides debugging + * information. + */ + @JsonProperty(value = "message", required = true) + private String message; + + /** + * The target of the particular error (for example, the name of the + * property in error). + */ + @JsonProperty(value = "target") + private String target; + + /** + * Contains nested errors that are related to this error. + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get an error code that describes the error condition more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set an error code that describes the error condition more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + * + * @param code the code value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withCode(String code) { + this.code = code; + return this; + } + + /** + * Get a message that describes the error in detail and provides debugging information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set a message that describes the error in detail and provides debugging information. + * + * @param message the message value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the target of the particular error (for example, the name of the property in error). + * + * @return the target value + */ + public String target() { + return this.target; + } + + /** + * Set the target of the particular error (for example, the name of the property in error). + * + * @param target the target value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get contains nested errors that are related to this error. + * + * @return the details value + */ + public List details() { + return this.details; + } + + /** + * Set contains nested errors that are related to this error. + * + * @param details the details value to set + * @return the ErrorResponseBody object itself. + */ + public ErrorResponseBody withDetails(List details) { + this.details = details; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java new file mode 100644 index 000000000000..b1a2fc05ce4f --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java new file mode 100644 index 000000000000..d7d24de85fd0 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/FeatureFlags.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for FeatureFlags. + */ +public final class FeatureFlags extends ExpandableStringEnum { + /** Static value ServiceMode for FeatureFlags. */ + public static final FeatureFlags SERVICE_MODE = fromString("ServiceMode"); + + /** Static value EnableConnectivityLogs for FeatureFlags. */ + public static final FeatureFlags ENABLE_CONNECTIVITY_LOGS = fromString("EnableConnectivityLogs"); + + /** Static value EnableMessagingLogs for FeatureFlags. */ + public static final FeatureFlags ENABLE_MESSAGING_LOGS = fromString("EnableMessagingLogs"); + + /** + * Creates or finds a FeatureFlags from its string representation. + * @param name a name to look for + * @return the corresponding FeatureFlags + */ + @JsonCreator + public static FeatureFlags fromString(String name) { + return fromString(name, FeatureFlags.class); + } + + /** + * @return known FeatureFlags values + */ + public static Collection values() { + return values(FeatureFlags.class); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java new file mode 100644 index 000000000000..23235178b46e --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/LogSpecification.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Specifications of the Logs for Azure Monitoring. + */ +public class LogSpecification { + /** + * Name of the log. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Localized friendly display name of the log. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get name of the log. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the log. + * + * @param name the name value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get localized friendly display name of the log. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set localized friendly display name of the log. + * + * @param displayName the displayName value to set + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java index 001917819772..d63103b27011 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NameAvailability.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.NameAvailabilityInner; /** * Type representing NameAvailability. */ -public interface NameAvailability extends HasInner, HasManager { +public interface NameAvailability extends HasInner, HasManager { /** * @return the message value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NetworkACL.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NetworkACL.java new file mode 100644 index 000000000000..6aef29e36191 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/NetworkACL.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network ACL. + */ +public class NetworkACL { + /** + * Allowed request types. The value can be: ClientConnection, + * ServerConnection, RESTAPI. + */ + @JsonProperty(value = "allow") + private List allow; + + /** + * Denied request types. The value can be: ClientConnection, + * ServerConnection, RESTAPI. + */ + @JsonProperty(value = "deny") + private List deny; + + /** + * Get allowed request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @return the allow value + */ + public List allow() { + return this.allow; + } + + /** + * Set allowed request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @param allow the allow value to set + * @return the NetworkACL object itself. + */ + public NetworkACL withAllow(List allow) { + this.allow = allow; + return this; + } + + /** + * Get denied request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @return the deny value + */ + public List deny() { + return this.deny; + } + + /** + * Set denied request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @param deny the deny value to set + * @return the NetworkACL object itself. + */ + public NetworkACL withDeny(List deny) { + this.deny = deny; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java index 04fb47e406b7..0fdb0ec57b73 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/Operation.java @@ -10,18 +10,23 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.OperationInner; /** * Type representing Operation. */ -public interface Operation extends HasInner, HasManager { +public interface Operation extends HasInner, HasManager { /** * @return the display value. */ OperationDisplay display(); + /** + * @return the isDataAction value. + */ + Boolean isDataAction(); + /** * @return the name value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpoint.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpoint.java new file mode 100644 index 000000000000..673a76407c36 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpoint.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private endpoint. + */ +public class PrivateEndpoint { + /** + * Full qualified Id of the private endpoint. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get full qualified Id of the private endpoint. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set full qualified Id of the private endpoint. + * + * @param id the id value to set + * @return the PrivateEndpoint object itself. + */ + public PrivateEndpoint withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointACL.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointACL.java new file mode 100644 index 000000000000..6e41c27c999c --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointACL.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ACL for a private endpoint. + */ +public class PrivateEndpointACL { + /** + * Name of the private endpoint connection. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Allowed request types. The value can be: ClientConnection, + * ServerConnection, RESTAPI. + */ + @JsonProperty(value = "allow") + private List allow; + + /** + * Denied request types. The value can be: ClientConnection, + * ServerConnection, RESTAPI. + */ + @JsonProperty(value = "deny") + private List deny; + + /** + * Get name of the private endpoint connection. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the private endpoint connection. + * + * @param name the name value to set + * @return the PrivateEndpointACL object itself. + */ + public PrivateEndpointACL withName(String name) { + this.name = name; + return this; + } + + /** + * Get allowed request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @return the allow value + */ + public List allow() { + return this.allow; + } + + /** + * Set allowed request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @param allow the allow value to set + * @return the PrivateEndpointACL object itself. + */ + public PrivateEndpointACL withAllow(List allow) { + this.allow = allow; + return this; + } + + /** + * Get denied request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @return the deny value + */ + public List deny() { + return this.deny; + } + + /** + * Set denied request types. The value can be: ClientConnection, ServerConnection, RESTAPI. + * + * @param deny the deny value to set + * @return the PrivateEndpointACL object itself. + */ + public PrivateEndpointACL withDeny(List deny) { + this.deny = deny; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointConnection.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointConnection.java new file mode 100644 index 000000000000..98be9c9c8ebc --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateEndpointConnection.java @@ -0,0 +1,161 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.PrivateEndpointConnectionInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; + +/** + * Type representing PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroupName, DefinitionStages.WithResourceName, DefinitionStages.WithCreate { + } + + /** + * Grouping of PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a PrivateEndpointConnection definition. + */ + interface Blank extends WithResourceGroupName { + } + + /** + * The stage of the privateendpointconnection definition allowing to specify ResourceGroupName. + */ + interface WithResourceGroupName { + /** + * Specifies resourceGroupName. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal + * @return the next definition stage + */ + WithResourceName withResourceGroupName(String resourceGroupName); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify ResourceName. + */ + interface WithResourceName { + /** + * Specifies resourceName. + * @param resourceName The name of the SignalR resource + * @return the next definition stage + */ + WithCreate withResourceName(String resourceName); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint Private endpoint associated with the private endpoint connection + * @return the next definition stage + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection definition allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState Connection state + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { + } + } + /** + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { + } + + /** + * Grouping of PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint Private endpoint associated with the private endpoint connection + * @return the next update stage + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState Connection state + * @return the next update stage + */ + Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkResource.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkResource.java new file mode 100644 index 000000000000..48d554ca35b7 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkResource.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.PrivateLinkResourceInner; +import java.util.List; + +/** + * Type representing PrivateLinkResource. + */ +public interface PrivateLinkResource extends HasInner, HasManager { + /** + * @return the groupId value. + */ + String groupId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionState.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..bf82d2b25c66 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionState.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Connection state of the private endpoint connection. + */ +public class PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by + * the owner of the service. Possible values include: 'Pending', + * 'Approved', 'Rejected', 'Disconnected'. + */ + @JsonProperty(value = "status") + private PrivateLinkServiceConnectionStatus status; + + /** + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /** + * A message indicating if changes on the service provider require any + * updates on the consumer. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @return the status value + */ + public PrivateLinkServiceConnectionStatus status() { + return this.status; + } + + /** + * Set indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @param status the status value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateLinkServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the reason for approval/rejection of the connection. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set the reason for approval/rejection of the connection. + * + * @param description the description value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get a message indicating if changes on the service provider require any updates on the consumer. + * + * @return the actionsRequired value + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set a message indicating if changes on the service provider require any updates on the consumer. + * + * @param actionsRequired the actionsRequired value to set + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionStatus.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionStatus.java new file mode 100644 index 000000000000..b8e2f4e43fa5 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/PrivateLinkServiceConnectionStatus.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateLinkServiceConnectionStatus. + */ +public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for PrivateLinkServiceConnectionStatus. */ + public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateLinkServiceConnectionStatus. */ + public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateLinkServiceConnectionStatus. */ + public static final PrivateLinkServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for PrivateLinkServiceConnectionStatus. */ + public static final PrivateLinkServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a PrivateLinkServiceConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding PrivateLinkServiceConnectionStatus + */ + @JsonCreator + public static PrivateLinkServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateLinkServiceConnectionStatus.class); + } + + /** + * @return known PrivateLinkServiceConnectionStatus values + */ + public static Collection values() { + return values(PrivateLinkServiceConnectionStatus.class); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServerlessUpstreamSettings.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServerlessUpstreamSettings.java new file mode 100644 index 000000000000..7f68c7ae4154 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServerlessUpstreamSettings.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The settings for the Upstream when the Azure SignalR is in server-less mode. + */ +public class ServerlessUpstreamSettings { + /** + * Gets or sets the list of Upstream URL templates. Order matters, and the + * first matching template takes effects. + */ + @JsonProperty(value = "templates") + private List templates; + + /** + * Get gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects. + * + * @return the templates value + */ + public List templates() { + return this.templates; + } + + /** + * Set gets or sets the list of Upstream URL templates. Order matters, and the first matching template takes effects. + * + * @param templates the templates value to set + * @return the ServerlessUpstreamSettings object itself. + */ + public ServerlessUpstreamSettings withTemplates(List templates) { + this.templates = templates; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceKind.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceKind.java new file mode 100644 index 000000000000..42a9f3e5065a --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceKind.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ServiceKind. + */ +public final class ServiceKind extends ExpandableStringEnum { + /** Static value SignalR for ServiceKind. */ + public static final ServiceKind SIGNALR = fromString("SignalR"); + + /** Static value RawWebSockets for ServiceKind. */ + public static final ServiceKind RAW_WEB_SOCKETS = fromString("RawWebSockets"); + + /** + * Creates or finds a ServiceKind from its string representation. + * @param name a name to look for + * @return the corresponding ServiceKind + */ + @JsonCreator + public static ServiceKind fromString(String name) { + return fromString(name, ServiceKind.class); + } + + /** + * @return known ServiceKind values + */ + public static Collection values() { + return values(ServiceKind.class); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java index 91198028db82..16ba7c2c5c20 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/ServiceSpecification.java @@ -21,6 +21,12 @@ public class ServiceSpecification { @JsonProperty(value = "metricSpecifications") private List metricSpecifications; + /** + * Specifications of the Logs for Azure Monitoring. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + /** * Get specifications of the Metrics for Azure Monitoring. * @@ -41,4 +47,24 @@ public ServiceSpecification withMetricSpecifications(List m return this; } + /** + * Get specifications of the Logs for Azure Monitoring. + * + * @return the logSpecifications value + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set specifications of the Logs for Azure Monitoring. + * + * @param logSpecifications the logSpecifications value to set + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java index ee94beb048dc..c3976b25ac23 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateOrUpdateProperties.java @@ -43,6 +43,18 @@ public class SignalRCreateOrUpdateProperties { @JsonProperty(value = "cors") private SignalRCorsSettings cors; + /** + * Upstream settings when the Azure SignalR is in server-less mode. + */ + @JsonProperty(value = "upstream") + private ServerlessUpstreamSettings upstream; + + /** + * Network ACLs. + */ + @JsonProperty(value = "networkACLs") + private SignalRNetworkACLs networkACLs; + /** * Get prefix for the hostName of the SignalR service. Retained for future use. The hostname will be of format: &lt;hostNamePrefix&gt;.service.signalr.net. @@ -113,4 +125,44 @@ public SignalRCreateOrUpdateProperties withCors(SignalRCorsSettings cors) { return this; } + /** + * Get upstream settings when the Azure SignalR is in server-less mode. + * + * @return the upstream value + */ + public ServerlessUpstreamSettings upstream() { + return this.upstream; + } + + /** + * Set upstream settings when the Azure SignalR is in server-less mode. + * + * @param upstream the upstream value to set + * @return the SignalRCreateOrUpdateProperties object itself. + */ + public SignalRCreateOrUpdateProperties withUpstream(ServerlessUpstreamSettings upstream) { + this.upstream = upstream; + return this; + } + + /** + * Get network ACLs. + * + * @return the networkACLs value + */ + public SignalRNetworkACLs networkACLs() { + return this.networkACLs; + } + + /** + * Set network ACLs. + * + * @param networkACLs the networkACLs value to set + * @return the SignalRCreateOrUpdateProperties object itself. + */ + public SignalRCreateOrUpdateProperties withNetworkACLs(SignalRNetworkACLs networkACLs) { + this.networkACLs = networkACLs; + return this; + } + } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java index e73f20492c62..227e71cdeb02 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRCreateParameters.java @@ -25,6 +25,13 @@ public class SignalRCreateParameters extends SignalRUpdateParameters { @JsonProperty(value = "location", required = true) private String location; + /** + * The kind of the service. (e.g. signalr vs. rawwebsockets). Possible + * values include: 'SignalR', 'RawWebSockets'. + */ + @JsonProperty(value = "kind") + private ServiceKind kind; + /** * Get azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | North Europe | East Asia | Southeast Asia | etc. The geo region of a resource never changes after it is created. @@ -47,4 +54,24 @@ public SignalRCreateParameters withLocation(String location) { return this; } + /** + * Get the kind of the service. (e.g. signalr vs. rawwebsockets). Possible values include: 'SignalR', 'RawWebSockets'. + * + * @return the kind value + */ + public ServiceKind kind() { + return this.kind; + } + + /** + * Set the kind of the service. (e.g. signalr vs. rawwebsockets). Possible values include: 'SignalR', 'RawWebSockets'. + * + * @param kind the kind value to set + * @return the SignalRCreateParameters object itself. + */ + public SignalRCreateParameters withKind(ServiceKind kind) { + this.kind = kind; + return this; + } + } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java index 5c30b34c063d..6b52480582bd 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRFeature.java @@ -16,10 +16,18 @@ */ public class SignalRFeature { /** - * Kind of feature. Required. + * FeatureFlags is the supported features of Azure SignalR service. + * - ServiceMode: Flag for backend server for SignalR service. Values + * allowed: "Default": have your own backend server; "Serverless": your + * application doesn't have a backend server; "Classic": for backward + * compatibility. Support both Default and Serverless mode but not + * recommended; "PredefinedOnly": for future use. + * - EnableConnectivityLogs: "true"/"false", to enable/disable the + * connectivity log category respectively. Possible values include: + * 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs'. */ @JsonProperty(value = "flag", required = true) - private String flag; + private FeatureFlags flag; /** * Value of the feature flag. See Azure SignalR service document @@ -36,29 +44,25 @@ public class SignalRFeature { private Map properties; /** - * Creates an instance of SignalRFeature class. - * @param value value of the feature flag. See Azure SignalR service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. - */ - public SignalRFeature() { - flag = "ServiceMode"; - } - - /** - * Get kind of feature. Required. + * Get featureFlags is the supported features of Azure SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs'. * * @return the flag value */ - public String flag() { + public FeatureFlags flag() { return this.flag; } /** - * Set kind of feature. Required. + * Set featureFlags is the supported features of Azure SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend server; "Classic": for backward compatibility. Support both Default and Serverless mode but not recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category respectively. Possible values include: 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs'. * * @param flag the flag value to set * @return the SignalRFeature object itself. */ - public SignalRFeature withFlag(String flag) { + public SignalRFeature withFlag(FeatureFlags flag) { this.flag = flag; return this; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java index 4db36385894f..d297b5d80ec7 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRKeys.java @@ -10,13 +10,13 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRKeysInner; /** * Type representing SignalRKeys. */ -public interface SignalRKeys extends HasInner, HasManager { +public interface SignalRKeys extends HasInner, HasManager { /** * @return the primaryConnectionString value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRNetworkACLs.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRNetworkACLs.java new file mode 100644 index 000000000000..51b86b483fe0 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRNetworkACLs.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network ACLs for SignalR. + */ +public class SignalRNetworkACLs { + /** + * Default action when no other rule matches. Possible values include: + * 'Allow', 'Deny'. + */ + @JsonProperty(value = "defaultAction") + private ACLAction defaultAction; + + /** + * ACL for requests from public network. + */ + @JsonProperty(value = "publicNetwork") + private NetworkACL publicNetwork; + + /** + * ACLs for requests from private endpoints. + */ + @JsonProperty(value = "privateEndpoints") + private List privateEndpoints; + + /** + * Get default action when no other rule matches. Possible values include: 'Allow', 'Deny'. + * + * @return the defaultAction value + */ + public ACLAction defaultAction() { + return this.defaultAction; + } + + /** + * Set default action when no other rule matches. Possible values include: 'Allow', 'Deny'. + * + * @param defaultAction the defaultAction value to set + * @return the SignalRNetworkACLs object itself. + */ + public SignalRNetworkACLs withDefaultAction(ACLAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get aCL for requests from public network. + * + * @return the publicNetwork value + */ + public NetworkACL publicNetwork() { + return this.publicNetwork; + } + + /** + * Set aCL for requests from public network. + * + * @param publicNetwork the publicNetwork value to set + * @return the SignalRNetworkACLs object itself. + */ + public SignalRNetworkACLs withPublicNetwork(NetworkACL publicNetwork) { + this.publicNetwork = publicNetwork; + return this; + } + + /** + * Get aCLs for requests from private endpoints. + * + * @return the privateEndpoints value + */ + public List privateEndpoints() { + return this.privateEndpoints; + } + + /** + * Set aCLs for requests from private endpoints. + * + * @param privateEndpoints the privateEndpoints value to set + * @return the SignalRNetworkACLs object itself. + */ + public SignalRNetworkACLs withPrivateEndpoints(List privateEndpoints) { + this.privateEndpoints = privateEndpoints; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateEndpointConnections.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateEndpointConnections.java new file mode 100644 index 000000000000..73d2a2be90ce --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateEndpointConnections.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRPrivateEndpointConnectionsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SignalRPrivateEndpointConnections. + */ +public interface SignalRPrivateEndpointConnections extends SupportsCreating, HasInner { + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName); + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName); + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateLinkResources.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateLinkResources.java new file mode 100644 index 000000000000..bb073d3ecabe --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRPrivateLinkResources.java @@ -0,0 +1,29 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRPrivateLinkResourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SignalRPrivateLinkResources. + */ +public interface SignalRPrivateLinkResources extends HasInner { + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String resourceName); + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java index cc3089b85072..49412f77d6f2 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRResource.java @@ -9,22 +9,17 @@ package com.microsoft.azure.management.signalr.v2018_10_01; import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.arm.resources.models.Resource; -import com.microsoft.azure.arm.resources.models.GroupableResourceCore; -import com.microsoft.azure.arm.resources.models.HasResourceGroup; -import com.microsoft.azure.arm.model.Refreshable; -import com.microsoft.azure.arm.model.Updatable; -import com.microsoft.azure.arm.model.Appliable; -import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; -import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRResourceInner; +import java.util.List; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.PrivateEndpointConnectionInner; +import java.util.Map; /** * Type representing SignalRResource. */ -public interface SignalRResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager { +public interface SignalRResource extends HasInner, HasManager { /** * @return the cors value. */ @@ -50,6 +45,36 @@ public interface SignalRResource extends HasInner, Resourc */ String hostNamePrefix(); + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + ServiceKind kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the networkACLs value. + */ + SignalRNetworkACLs networkACLs(); + + /** + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * @return the provisioningState value. */ @@ -70,98 +95,24 @@ public interface SignalRResource extends HasInner, Resourc */ ResourceSku sku(); + /** + * @return the tags value. + */ + Map tags(); + + /** + * @return the type value. + */ + String type(); + + /** + * @return the upstream value. + */ + ServerlessUpstreamSettings upstream(); + /** * @return the version value. */ String version(); - /** - * The entirety of the SignalRResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate { - } - - /** - * Grouping of SignalRResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of a SignalRResource definition. - */ - interface Blank extends GroupableResourceCore.DefinitionWithRegion { - } - - /** - * The stage of the SignalRResource definition allowing to specify the resource group. - */ - interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup { - } - - /** - * The stage of the signalrresource definition allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - * @param properties Settings used to provision or configure the resource - * @return the next definition stage - */ - WithCreate withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource definition allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - * @param sku The billing information of the resource.(e.g. basic vs. standard) - * @return the next definition stage - */ - WithCreate withSku(ResourceSku sku); - } - - /** - * The stage of the definition which contains all the minimum required inputs for - * the resource to be created (via {@link WithCreate#create()}), but also allows - * for any other optional settings to be specified. - */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithProperties, DefinitionStages.WithSku { - } - } - /** - * The template for a SignalRResource update operation, containing all the settings that can be modified. - */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithProperties, UpdateStages.WithSku { - } - - /** - * Grouping of SignalRResource update stages. - */ - interface UpdateStages { - /** - * The stage of the signalrresource update allowing to specify Properties. - */ - interface WithProperties { - /** - * Specifies properties. - * @param properties Settings used to provision or configure the resource - * @return the next update stage - */ - Update withProperties(SignalRCreateOrUpdateProperties properties); - } - - /** - * The stage of the signalrresource update allowing to specify Sku. - */ - interface WithSku { - /** - * Specifies sku. - * @param sku The billing information of the resource.(e.g. basic vs. standard) - * @return the next update stage - */ - Update withSku(ResourceSku sku); - } - - } } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java index e5ab78e6944f..06ee3c348d0d 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRUsage.java @@ -11,12 +11,12 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRUsageInner; import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRManager; +import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRServiceManager; /** * Type representing SignalRUsage. */ -public interface SignalRUsage extends HasInner, HasManager { +public interface SignalRUsage extends HasInner, HasManager { /** * @return the currentValue value. */ diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java index dbcb36c88c94..2ca10f950126 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/SignalRs.java @@ -8,21 +8,22 @@ package com.microsoft.azure.management.signalr.v2018_10_01; -import com.microsoft.azure.arm.collection.SupportsCreating; -import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup; -import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion; -import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; import rx.Observable; -import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; -import com.microsoft.azure.arm.collection.SupportsListing; import rx.Completable; -import com.microsoft.azure.management.signalr.v2018_10_01.implementation.SignalRsInner; -import com.microsoft.azure.arm.model.HasInner; /** * Type representing SignalRs. */ -public interface SignalRs extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { +public interface SignalRs { + /** + * Checks that the SignalR name is valid and is not already in use. + * + * @param location the region + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkNameAvailabilityAsync(String location); + /** * Get the access keys of the SignalR resource. * @@ -43,6 +44,46 @@ public interface SignalRs extends SupportsCreating regenerateKeyAsync(String resourceGroupName, String resourceName); + /** + * Get the SignalR service and its properties. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Create a new SignalR service and update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable createOrUpdateAsync(String resourceGroupName, String resourceName); + + /** + * Operation to delete a SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String resourceName); + + /** + * Operation to update an exiting SignalR service. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable updateAsync(String resourceGroupName, String resourceName); + /** * Operation to restart a SignalR service. * @@ -54,12 +95,20 @@ public interface SignalRs extends SupportsCreating checkNameAvailabilityAsync(String location); + Observable listAsync(); + + /** + * Handles requests to list all resources in a resource group. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByResourceGroupAsync(final String resourceGroupName); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/UpstreamTemplate.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/UpstreamTemplate.java new file mode 100644 index 000000000000..33907ac89001 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/UpstreamTemplate.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Upstream template item settings. It defines the Upstream URL of the incoming + * requests. + * The template defines the pattern of the event, the hub or the category of + * the incoming request that matches current URL template. + */ +public class UpstreamTemplate { + /** + * Gets or sets the matching pattern for hub names. If not set, it matches + * any hub. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any hub name + * 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches + * "hub1" and "hub2" + * 3. The single hub name, for example, "hub1", it matches "hub1". + */ + @JsonProperty(value = "hubPattern") + private String hubPattern; + + /** + * Gets or sets the matching pattern for event names. If not set, it + * matches any event. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any event name + * 2. Combine multiple events with ",", for example "connect,disconnect", + * it matches event "connect" and "disconnect" + * 3. The single event name, for example, "connect", it matches "connect". + */ + @JsonProperty(value = "eventPattern") + private String eventPattern; + + /** + * Gets or sets the matching pattern for category names. If not set, it + * matches any category. + * There are 3 kind of patterns supported: + * 1. "*", it to matches any category name + * 2. Combine multiple categories with ",", for example + * "connections,messages", it matches category "connections" and "messages" + * 3. The single category name, for example, "connections", it matches the + * category "connections". + */ + @JsonProperty(value = "categoryPattern") + private String categoryPattern; + + /** + * Gets or sets the Upstream URL template. You can use 3 predefined + * parameters {hub}, {category} {event} inside the template, the value of + * the Upstream URL is dynamically calculated when the client request comes + * in. + * For example, if the urlTemplate is + * `http://example.com/{hub}/api/{event}`, with a client request from hub + * `chat` connects, it will first POST to this URL: + * `http://example.com/chat/api/connect`. + */ + @JsonProperty(value = "urlTemplate", required = true) + private String urlTemplate; + + /** + * Get gets or sets the matching pattern for hub names. If not set, it matches any hub. + There are 3 kind of patterns supported: + 1. "*", it to matches any hub name + 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2" + 3. The single hub name, for example, "hub1", it matches "hub1". + * + * @return the hubPattern value + */ + public String hubPattern() { + return this.hubPattern; + } + + /** + * Set gets or sets the matching pattern for hub names. If not set, it matches any hub. + There are 3 kind of patterns supported: + 1. "*", it to matches any hub name + 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches "hub1" and "hub2" + 3. The single hub name, for example, "hub1", it matches "hub1". + * + * @param hubPattern the hubPattern value to set + * @return the UpstreamTemplate object itself. + */ + public UpstreamTemplate withHubPattern(String hubPattern) { + this.hubPattern = hubPattern; + return this; + } + + /** + * Get gets or sets the matching pattern for event names. If not set, it matches any event. + There are 3 kind of patterns supported: + 1. "*", it to matches any event name + 2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect" + 3. The single event name, for example, "connect", it matches "connect". + * + * @return the eventPattern value + */ + public String eventPattern() { + return this.eventPattern; + } + + /** + * Set gets or sets the matching pattern for event names. If not set, it matches any event. + There are 3 kind of patterns supported: + 1. "*", it to matches any event name + 2. Combine multiple events with ",", for example "connect,disconnect", it matches event "connect" and "disconnect" + 3. The single event name, for example, "connect", it matches "connect". + * + * @param eventPattern the eventPattern value to set + * @return the UpstreamTemplate object itself. + */ + public UpstreamTemplate withEventPattern(String eventPattern) { + this.eventPattern = eventPattern; + return this; + } + + /** + * Get gets or sets the matching pattern for category names. If not set, it matches any category. + There are 3 kind of patterns supported: + 1. "*", it to matches any category name + 2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and "messages" + 3. The single category name, for example, "connections", it matches the category "connections". + * + * @return the categoryPattern value + */ + public String categoryPattern() { + return this.categoryPattern; + } + + /** + * Set gets or sets the matching pattern for category names. If not set, it matches any category. + There are 3 kind of patterns supported: + 1. "*", it to matches any category name + 2. Combine multiple categories with ",", for example "connections,messages", it matches category "connections" and "messages" + 3. The single category name, for example, "connections", it matches the category "connections". + * + * @param categoryPattern the categoryPattern value to set + * @return the UpstreamTemplate object itself. + */ + public UpstreamTemplate withCategoryPattern(String categoryPattern) { + this.categoryPattern = categoryPattern; + return this; + } + + /** + * Get gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event} inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in. + For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, with a client request from hub `chat` connects, it will first POST to this URL: `http://example.com/chat/api/connect`. + * + * @return the urlTemplate value + */ + public String urlTemplate() { + return this.urlTemplate; + } + + /** + * Set gets or sets the Upstream URL template. You can use 3 predefined parameters {hub}, {category} {event} inside the template, the value of the Upstream URL is dynamically calculated when the client request comes in. + For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, with a client request from hub `chat` connects, it will first POST to this URL: `http://example.com/chat/api/connect`. + * + * @param urlTemplate the urlTemplate value to set + * @return the UpstreamTemplate object itself. + */ + public UpstreamTemplate withUrlTemplate(String urlTemplate) { + this.urlTemplate = urlTemplate; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java index 552563a0b4d1..8c6768c159f5 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/NameAvailabilityImpl.java @@ -12,14 +12,14 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; class NameAvailabilityImpl extends WrapperImpl implements NameAvailability { - private final SignalRManager manager; - NameAvailabilityImpl(NameAvailabilityInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + NameAvailabilityImpl(NameAvailabilityInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java index 74bae25940e9..4328878bc592 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationImpl.java @@ -14,14 +14,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.OperationProperties; class OperationImpl extends WrapperImpl implements Operation { - private final SignalRManager manager; - OperationImpl(OperationInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + OperationImpl(OperationInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } @@ -30,6 +30,11 @@ public OperationDisplay display() { return this.inner().display(); } + @Override + public Boolean isDataAction() { + return this.inner().isDataAction(); + } + @Override public String name() { return this.inner().name(); diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java index 5a92aa05e8f4..d36c21622791 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationInner.java @@ -22,6 +22,12 @@ public class OperationInner { @JsonProperty(value = "name") private String name; + /** + * If the operation is a data action. (for data plane rbac). + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + /** * The object that describes the operation. */ @@ -61,6 +67,26 @@ public OperationInner withName(String name) { return this; } + /** + * Get if the operation is a data action. (for data plane rbac). + * + * @return the isDataAction value + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set if the operation is a data action. (for data plane rbac). + * + * @param isDataAction the isDataAction value to set + * @return the OperationInner object itself. + */ + public OperationInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + /** * Get the object that describes the operation. * diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java index 4af31a9e5b87..64b3c156fd18 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsImpl.java @@ -17,14 +17,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.Operation; class OperationsImpl extends WrapperImpl implements Operations { - private final SignalRManager manager; + private final SignalRServiceManager manager; - OperationsImpl(SignalRManager manager) { + OperationsImpl(SignalRServiceManager manager) { super(manager.inner().operations()); this.manager = manager; } - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java index 14e1c8e375cc..f2d57589c3f2 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/OperationsInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceFuture; @@ -69,7 +69,7 @@ interface OperationsService { * Lists all of the available REST API operations of the Microsoft.SignalRService provider. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<OperationInner> object if successful. */ @@ -162,10 +162,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -174,7 +174,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..8811eb2de7e9 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,130 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateEndpoint; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateLinkServiceConnectionState; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private String privateEndpointConnectionName; + private String resourceGroupName; + private String resourceName; + private final SignalRServiceManager manager; + + PrivateEndpointConnectionImpl(String name, SignalRServiceManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, SignalRServiceManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.privateEndpointConnectionName = inner.name(); + // set resource ancestor and positional variables + this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "signalR"); + // set other parameters for create and update + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + SignalRPrivateEndpointConnectionsInner client = this.manager().inner().signalRPrivateEndpointConnections(); + return client.createAsync(this.privateEndpointConnectionName, this.resourceGroupName, this.resourceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + SignalRPrivateEndpointConnectionsInner client = this.manager().inner().signalRPrivateEndpointConnections(); + return client.createAsync(this.privateEndpointConnectionName, this.resourceGroupName, this.resourceName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + SignalRPrivateEndpointConnectionsInner client = this.manager().inner().signalRPrivateEndpointConnections(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + return this.inner().privateEndpoint(); + } + + @Override + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + @Override + public PrivateEndpointConnectionImpl withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.inner().withPrivateEndpoint(privateEndpoint); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.inner().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..f9c4e3c23c7c --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateEndpointConnectionInner.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateEndpoint; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * A private endpoint connection to SignalR resource. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends ProxyResource { + /** + * Provisioning state of the private endpoint connection. Possible values + * include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', + * 'Creating', 'Updating', 'Deleting', 'Moving'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * Private endpoint associated with the private endpoint connection. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /** + * Connection state. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Get provisioning state of the private endpoint connection. Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get private endpoint associated with the private endpoint connection. + * + * @return the privateEndpoint value + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set private endpoint associated with the private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get connection state. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set connection state. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..f07a02fa2efc --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateLinkResource; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class PrivateLinkResourceImpl extends WrapperImpl implements PrivateLinkResource { + private final SignalRServiceManager manager; + PrivateLinkResourceImpl(PrivateLinkResourceInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public String groupId() { + return this.inner().groupId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List requiredMembers() { + return this.inner().requiredMembers(); + } + + @Override + public List requiredZoneNames() { + return this.inner().requiredZoneNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..c6bb4529f454 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/PrivateLinkResourceInner.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Private link resource. + */ +@JsonFlatten +public class PrivateLinkResourceInner extends ProxyResource { + /** + * Group Id of the private link resource. + */ + @JsonProperty(value = "properties.groupId") + private String groupId; + + /** + * Required members of the private link resource. + */ + @JsonProperty(value = "properties.requiredMembers") + private List requiredMembers; + + /** + * Required private DNS zone names. + */ + @JsonProperty(value = "properties.requiredZoneNames") + private List requiredZoneNames; + + /** + * Get group Id of the private link resource. + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Set group Id of the private link resource. + * + * @param groupId the groupId value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get required members of the private link resource. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Set required members of the private link resource. + * + * @param requiredMembers the requiredMembers value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + + /** + * Get required private DNS zone names. + * + * @return the requiredZoneNames value + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set required private DNS zone names. + * + * @param requiredZoneNames the requiredZoneNames value to set + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java index 48874f604771..e2d18e642289 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRKeysImpl.java @@ -12,14 +12,14 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; class SignalRKeysImpl extends WrapperImpl implements SignalRKeys { - private final SignalRManager manager; - SignalRKeysImpl(SignalRKeysInner inner, SignalRManager manager) { + private final SignalRServiceManager manager; + SignalRKeysImpl(SignalRKeysInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java index a91761180c80..ac5e532671ae 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRManagementClientImpl.java @@ -10,6 +10,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; @@ -158,6 +160,32 @@ public SignalRsInner signalRs() { return this.signalRs; } + /** + * The SignalRPrivateEndpointConnectionsInner object to access its operations. + */ + private SignalRPrivateEndpointConnectionsInner signalRPrivateEndpointConnections; + + /** + * Gets the SignalRPrivateEndpointConnectionsInner object to access its operations. + * @return the SignalRPrivateEndpointConnectionsInner object. + */ + public SignalRPrivateEndpointConnectionsInner signalRPrivateEndpointConnections() { + return this.signalRPrivateEndpointConnections; + } + + /** + * The SignalRPrivateLinkResourcesInner object to access its operations. + */ + private SignalRPrivateLinkResourcesInner signalRPrivateLinkResources; + + /** + * Gets the SignalRPrivateLinkResourcesInner object to access its operations. + * @return the SignalRPrivateLinkResourcesInner object. + */ + public SignalRPrivateLinkResourcesInner signalRPrivateLinkResources() { + return this.signalRPrivateLinkResources; + } + /** * The UsagesInner object to access its operations. */ @@ -208,6 +236,8 @@ protected void initialize() { this.generateClientRequestId = true; this.operations = new OperationsInner(restClient().retrofit(), this); this.signalRs = new SignalRsInner(restClient().retrofit(), this); + this.signalRPrivateEndpointConnections = new SignalRPrivateEndpointConnectionsInner(restClient().retrofit(), this); + this.signalRPrivateLinkResources = new SignalRPrivateLinkResourcesInner(restClient().retrofit(), this); this.usages = new UsagesInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..52949481e3a1 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * jkl + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections; +import rx.Completable; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateEndpointConnection; + +class SignalRPrivateEndpointConnectionsImpl extends WrapperImpl implements SignalRPrivateEndpointConnections { + private final SignalRServiceManager manager; + + SignalRPrivateEndpointConnectionsImpl(SignalRServiceManager manager) { + super(manager.inner().signalRPrivateEndpointConnections()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public PrivateEndpointConnectionImpl define(String name) { + return wrapModel(name); + } + + private PrivateEndpointConnectionImpl wrapModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + private PrivateEndpointConnectionImpl wrapModel(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + SignalRPrivateEndpointConnectionsInner client = this.inner(); + return client.getAsync(privateEndpointConnectionName, resourceGroupName, resourceName) + .map(new Func1() { + @Override + public PrivateEndpointConnection call(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + }); + } + + @Override + public Completable deleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + SignalRPrivateEndpointConnectionsInner client = this.inner(); + return client.deleteAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toCompletable(); + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsInner.java new file mode 100644 index 000000000000..2c550fcfb974 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateEndpointConnectionsInner.java @@ -0,0 +1,684 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in SignalRPrivateEndpointConnections. + */ +public class SignalRPrivateEndpointConnectionsInner { + /** The Retrofit service to perform REST calls. */ + private SignalRPrivateEndpointConnectionsService service; + /** The service client containing this operation class. */ + private SignalRManagementClientImpl client; + + /** + * Initializes an instance of SignalRPrivateEndpointConnectionsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SignalRPrivateEndpointConnectionsInner(Retrofit retrofit, SignalRManagementClientImpl client) { + this.service = retrofit.create(SignalRPrivateEndpointConnectionsService.class); + this.client = client; + } + + /** + * The interface defining all the services for SignalRPrivateEndpointConnections to be + * used by Retrofit to perform actually REST calls. + */ + interface SignalRPrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> get(@Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections create" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> create(@Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body PrivateEndpointConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections beginCreate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + Observable> beginCreate(@Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Body PrivateEndpointConnectionInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner get(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return getWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName), serviceCallback); + } + + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable getAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return getWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> getWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner create(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName), serviceCallback); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final PrivateEndpointConnectionInner parameters = null; + Observable> observable = service.create(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner create(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + return createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).toBlocking().last().body(); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + return createWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + Observable> observable = service.create(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner beginCreate(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName), serviceCallback); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable beginCreateAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final PrivateEndpointConnectionInner parameters = null; + return service.beginCreate(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. + */ + public PrivateEndpointConnectionInner beginCreate(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + return beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).toBlocking().single().body(); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters), serviceCallback); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable beginCreateAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + return beginCreateWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { + @Override + public PrivateEndpointConnectionInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Update the state of specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param parameters The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateEndpointConnectionInner object + */ + public Observable> beginCreateWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, PrivateEndpointConnectionInner parameters) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.beginCreate(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + deleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toBlocking().last().body(); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName), serviceCallback); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return deleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Observable> observable = service.delete(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + beginDeleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).toBlocking().single().body(); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName), serviceCallback); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + return beginDeleteWithServiceResponseAsync(privateEndpointConnectionName, resourceGroupName, resourceName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Delete the specified private endpoint connection associated with a SignalR resource. + * + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the SignalR resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String privateEndpointConnectionName, String resourceGroupName, String resourceName) { + if (privateEndpointConnectionName == null) { + throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.beginDelete(privateEndpointConnectionName, this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..a2d78e6ebbf5 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * abc + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateLinkResources; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.signalr.v2018_10_01.PrivateLinkResource; + +class SignalRPrivateLinkResourcesImpl extends WrapperImpl implements SignalRPrivateLinkResources { + private final SignalRServiceManager manager; + + SignalRPrivateLinkResourcesImpl(SignalRServiceManager manager) { + super(manager.inner().signalRPrivateLinkResources()); + this.manager = manager; + } + + public SignalRServiceManager manager() { + return this.manager; + } + + @Override + public Observable listAsync(final String resourceGroupName, final String resourceName) { + SignalRPrivateLinkResourcesInner client = this.inner(); + return client.listAsync(resourceGroupName, resourceName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateLinkResource call(PrivateLinkResourceInner inner) { + return new PrivateLinkResourceImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesInner.java new file mode 100644 index 000000000000..a78aff32bfa7 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRPrivateLinkResourcesInner.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in SignalRPrivateLinkResources. + */ +public class SignalRPrivateLinkResourcesInner { + /** The Retrofit service to perform REST calls. */ + private SignalRPrivateLinkResourcesService service; + /** The service client containing this operation class. */ + private SignalRManagementClientImpl client; + + /** + * Initializes an instance of SignalRPrivateLinkResourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SignalRPrivateLinkResourcesInner(Retrofit retrofit, SignalRManagementClientImpl client) { + this.service = retrofit.create(SignalRPrivateLinkResourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for SignalRPrivateLinkResources to be + * used by Retrofit to perform actually REST calls. + */ + interface SignalRPrivateLinkResourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateLinkResources list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateLinkResources listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PrivateLinkResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String resourceName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, resourceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String resourceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, resourceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String resourceName) { + return listWithServiceResponseAsync(resourceGroupName, resourceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { + return listSinglePageAsync(resourceGroupName, resourceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + ServiceResponse> * @param resourceName The name of the SignalR resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String resourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (resourceName == null) { + throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PrivateLinkResourceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Get the private link resources that need to be created for a SignalR resource. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java index c34adf5b31d7..a4d585f864f4 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceImpl.java @@ -8,97 +8,83 @@ package com.microsoft.azure.management.signalr.v2018_10_01.implementation; -import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; -import rx.Observable; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUpdateParameters; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateParameters; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCorsSettings; import java.util.List; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; +import com.microsoft.azure.management.signalr.v2018_10_01.ServiceKind; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRNetworkACLs; import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; import com.microsoft.azure.management.signalr.v2018_10_01.ResourceSku; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCreateOrUpdateProperties; -import rx.functions.Func1; +import java.util.Map; +import com.microsoft.azure.management.signalr.v2018_10_01.ServerlessUpstreamSettings; -class SignalRResourceImpl extends GroupableResourceCoreImpl implements SignalRResource, SignalRResource.Definition, SignalRResource.Update { - private SignalRCreateParameters createParameter; - private SignalRUpdateParameters updateParameter; - SignalRResourceImpl(String name, SignalRResourceInner inner, SignalRManager manager) { - super(name, inner, manager); - this.createParameter = new SignalRCreateParameters(); - this.updateParameter = new SignalRUpdateParameters(); +class SignalRResourceImpl extends WrapperImpl implements SignalRResource { + private final SignalRServiceManager manager; + SignalRResourceImpl(SignalRResourceInner inner, SignalRServiceManager manager) { + super(inner); + this.manager = manager; } @Override - public Observable createResourceAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - this.createParameter.withLocation(inner().location()); - this.createParameter.withTags(inner().getTags()); - return client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.createParameter) - .map(new Func1() { - @Override - public SignalRResourceInner call(SignalRResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); + public SignalRServiceManager manager() { + return this.manager; } @Override - public Observable updateResourceAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter) - .map(new Func1() { - @Override - public SignalRResourceInner call(SignalRResourceInner resource) { - resetCreateUpdateParameters(); - return resource; - } - }) - .map(innerToFluentMap(this)); + public SignalRCorsSettings cors() { + return this.inner().cors(); } @Override - protected Observable getInnerAsync() { - SignalRsInner client = this.manager().inner().signalRs(); - return client.getByResourceGroupAsync(this.resourceGroupName(), this.name()); + public String externalIP() { + return this.inner().externalIP(); } @Override - public boolean isInCreateMode() { - return this.inner().id() == null; + public List features() { + return this.inner().features(); } - private void resetCreateUpdateParameters() { - this.createParameter = new SignalRCreateParameters(); - this.updateParameter = new SignalRUpdateParameters(); + @Override + public String hostName() { + return this.inner().hostName(); } @Override - public SignalRCorsSettings cors() { - return this.inner().cors(); + public String hostNamePrefix() { + return this.inner().hostNamePrefix(); } @Override - public String externalIP() { - return this.inner().externalIP(); + public String id() { + return this.inner().id(); } @Override - public List features() { - return this.inner().features(); + public ServiceKind kind() { + return this.inner().kind(); } @Override - public String hostName() { - return this.inner().hostName(); + public String location() { + return this.inner().location(); } @Override - public String hostNamePrefix() { - return this.inner().hostNamePrefix(); + public String name() { + return this.inner().name(); + } + + @Override + public SignalRNetworkACLs networkACLs() { + return this.inner().networkACLs(); + } + + @Override + public List privateEndpointConnections() { + return this.inner().privateEndpointConnections(); } @Override @@ -122,28 +108,23 @@ public ResourceSku sku() { } @Override - public String version() { - return this.inner().version(); + public Map tags() { + return this.inner().getTags(); + } + + @Override + public String type() { + return this.inner().type(); } @Override - public SignalRResourceImpl withProperties(SignalRCreateOrUpdateProperties properties) { - if (isInCreateMode()) { - this.createParameter.withProperties(properties); - } else { - this.updateParameter.withProperties(properties); - } - return this; + public ServerlessUpstreamSettings upstream() { + return this.inner().upstream(); } @Override - public SignalRResourceImpl withSku(ResourceSku sku) { - if (isInCreateMode()) { - this.createParameter.withSku(sku); - } else { - this.updateParameter.withSku(sku); - } - return this; + public String version() { + return this.inner().version(); } } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java index 8a4abca6dbf8..cea062bf9cf0 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRResourceInner.java @@ -12,7 +12,10 @@ import java.util.List; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRFeature; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRCorsSettings; +import com.microsoft.azure.management.signalr.v2018_10_01.ServerlessUpstreamSettings; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRNetworkACLs; import com.microsoft.azure.management.signalr.v2018_10_01.ProvisioningState; +import com.microsoft.azure.management.signalr.v2018_10_01.ServiceKind; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.rest.SkipParentValidation; @@ -58,6 +61,18 @@ public class SignalRResourceInner extends Resource { @JsonProperty(value = "properties.cors") private SignalRCorsSettings cors; + /** + * Upstream settings when the Azure SignalR is in server-less mode. + */ + @JsonProperty(value = "properties.upstream") + private ServerlessUpstreamSettings upstream; + + /** + * Network ACLs. + */ + @JsonProperty(value = "properties.networkACLs") + private SignalRNetworkACLs networkACLs; + /** * Provisioning state of the resource. Possible values include: 'Unknown', * 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', @@ -99,6 +114,20 @@ public class SignalRResourceInner extends Resource { @JsonProperty(value = "properties.version") private String version; + /** + * Private endpoint connections to the SignalR resource. + */ + @JsonProperty(value = "properties.privateEndpointConnections") + private List privateEndpointConnections; + + /** + * The kind of the service - e.g. "SignalR", or "RawWebSockets" for + * "Microsoft.SignalRService/SignalR". Possible values include: 'SignalR', + * 'RawWebSockets'. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private ServiceKind kind; + /** * Get sKU of the service. * @@ -189,6 +218,46 @@ public SignalRResourceInner withCors(SignalRCorsSettings cors) { return this; } + /** + * Get upstream settings when the Azure SignalR is in server-less mode. + * + * @return the upstream value + */ + public ServerlessUpstreamSettings upstream() { + return this.upstream; + } + + /** + * Set upstream settings when the Azure SignalR is in server-less mode. + * + * @param upstream the upstream value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withUpstream(ServerlessUpstreamSettings upstream) { + this.upstream = upstream; + return this; + } + + /** + * Get network ACLs. + * + * @return the networkACLs value + */ + public SignalRNetworkACLs networkACLs() { + return this.networkACLs; + } + + /** + * Set network ACLs. + * + * @param networkACLs the networkACLs value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withNetworkACLs(SignalRNetworkACLs networkACLs) { + this.networkACLs = networkACLs; + return this; + } + /** * Get provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'. * @@ -254,4 +323,33 @@ public SignalRResourceInner withVersion(String version) { return this; } + /** + * Get private endpoint connections to the SignalR resource. + * + * @return the privateEndpointConnections value + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Set private endpoint connections to the SignalR resource. + * + * @param privateEndpointConnections the privateEndpointConnections value to set + * @return the SignalRResourceInner object itself. + */ + public SignalRResourceInner withPrivateEndpointConnections(List privateEndpointConnections) { + this.privateEndpointConnections = privateEndpointConnections; + return this; + } + + /** + * Get the kind of the service - e.g. "SignalR", or "RawWebSockets" for "Microsoft.SignalRService/SignalR". Possible values include: 'SignalR', 'RawWebSockets'. + * + * @return the kind value + */ + public ServiceKind kind() { + return this.kind; + } + } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java new file mode 100644 index 000000000000..199cf4d1aa04 --- /dev/null +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRServiceManager.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.signalr.v2018_10_01.implementation; + +import com.microsoft.azure.AzureEnvironment; +import com.microsoft.azure.AzureResponseBuilder; +import com.microsoft.azure.credentials.AzureTokenCredentials; +import com.microsoft.azure.management.apigeneration.Beta; +import com.microsoft.azure.management.apigeneration.Beta.SinceVersion; +import com.microsoft.azure.arm.resources.AzureConfigurable; +import com.microsoft.azure.serializer.AzureJacksonAdapter; +import com.microsoft.rest.RestClient; +import com.microsoft.azure.management.signalr.v2018_10_01.Operations; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRs; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateEndpointConnections; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRPrivateLinkResources; +import com.microsoft.azure.management.signalr.v2018_10_01.Usages; +import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; +import com.microsoft.azure.arm.resources.implementation.ManagerCore; + +/** + * Entry point to Azure SignalRService resource management. + */ +public final class SignalRServiceManager extends ManagerCore { + private Operations operations; + private SignalRs signalRs; + private SignalRPrivateEndpointConnections signalRPrivateEndpointConnections; + private SignalRPrivateLinkResources signalRPrivateLinkResources; + private Usages usages; + /** + * Get a Configurable instance that can be used to create SignalRServiceManager with optional configuration. + * + * @return the instance allowing configurations + */ + public static Configurable configure() { + return new SignalRServiceManager.ConfigurableImpl(); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return new SignalRServiceManager(new RestClient.Builder() + .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER) + .withCredentials(credentials) + .withSerializerAdapter(new AzureJacksonAdapter()) + .withResponseBuilderFactory(new AzureResponseBuilder.Factory()) + .build(), subscriptionId); + } + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService resource management API entry points. + * + * @param restClient the RestClient to be used for API calls. + * @param subscriptionId the subscription UUID + * @return the SignalRServiceManager + */ + public static SignalRServiceManager authenticate(RestClient restClient, String subscriptionId) { + return new SignalRServiceManager(restClient, subscriptionId); + } + /** + * The interface allowing configurations to be set. + */ + public interface Configurable extends AzureConfigurable { + /** + * Creates an instance of SignalRServiceManager that exposes SignalRService management API entry points. + * + * @param credentials the credentials to use + * @param subscriptionId the subscription UUID + * @return the interface exposing SignalRService management API entry points that work across subscriptions + */ + SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId); + } + + /** + * @return Entry point to manage Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(this); + } + return this.operations; + } + + /** + * @return Entry point to manage SignalRs. + */ + public SignalRs signalRs() { + if (this.signalRs == null) { + this.signalRs = new SignalRsImpl(this); + } + return this.signalRs; + } + + /** + * @return Entry point to manage SignalRPrivateEndpointConnections. + */ + public SignalRPrivateEndpointConnections signalRPrivateEndpointConnections() { + if (this.signalRPrivateEndpointConnections == null) { + this.signalRPrivateEndpointConnections = new SignalRPrivateEndpointConnectionsImpl(this); + } + return this.signalRPrivateEndpointConnections; + } + + /** + * @return Entry point to manage SignalRPrivateLinkResources. + */ + public SignalRPrivateLinkResources signalRPrivateLinkResources() { + if (this.signalRPrivateLinkResources == null) { + this.signalRPrivateLinkResources = new SignalRPrivateLinkResourcesImpl(this); + } + return this.signalRPrivateLinkResources; + } + + /** + * @return Entry point to manage Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(this); + } + return this.usages; + } + + /** + * The implementation for Configurable interface. + */ + private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable { + public SignalRServiceManager authenticate(AzureTokenCredentials credentials, String subscriptionId) { + return SignalRServiceManager.authenticate(buildRestClient(credentials), subscriptionId); + } + } + private SignalRServiceManager(RestClient restClient, String subscriptionId) { + super( + restClient, + subscriptionId, + new SignalRManagementClientImpl(restClient).withSubscriptionId(subscriptionId)); + } +} diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java index 4cf9afbc0550..82292f4377bd 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRUsageImpl.java @@ -14,15 +14,15 @@ import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsageName; class SignalRUsageImpl extends WrapperImpl implements SignalRUsage { - private final SignalRManager manager; + private final SignalRServiceManager manager; - SignalRUsageImpl(SignalRUsageInner inner, SignalRManager manager) { + SignalRUsageImpl(SignalRUsageInner inner, SignalRServiceManager manager) { super(inner); this.manager = manager; } @Override - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java index e1aa06a1b2b4..1781d9cb2c12 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsImpl.java @@ -4,104 +4,115 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * def + * abc */ package com.microsoft.azure.management.signalr.v2018_10_01.implementation; -import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.signalr.v2018_10_01.SignalRs; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; +import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRKeys; import rx.Completable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import com.microsoft.azure.arm.resources.ResourceUtilsCore; -import com.microsoft.azure.arm.utils.RXMapper; -import rx.functions.Func1; -import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; -import com.microsoft.azure.management.signalr.v2018_10_01.SignalRKeys; -import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailability; +import com.microsoft.azure.management.signalr.v2018_10_01.SignalRResource; + +class SignalRsImpl extends WrapperImpl implements SignalRs { + private final SignalRServiceManager manager; -class SignalRsImpl extends GroupableResourcesCoreImpl implements SignalRs { - protected SignalRsImpl(SignalRManager manager) { - super(manager.inner().signalRs(), manager); + SignalRsImpl(SignalRServiceManager manager) { + super(manager.inner().signalRs()); + this.manager = manager; } - @Override - protected Observable getInnerAsync(String resourceGroupName, String name) { - SignalRsInner client = this.inner(); - return client.getByResourceGroupAsync(resourceGroupName, name); + public SignalRServiceManager manager() { + return this.manager; } @Override - protected Completable deleteInnerAsync(String resourceGroupName, String name) { + public Observable checkNameAvailabilityAsync(String location) { SignalRsInner client = this.inner(); - return client.deleteAsync(resourceGroupName, name).toCompletable(); + return client.checkNameAvailabilityAsync(location) + .map(new Func1() { + @Override + public NameAvailability call(NameAvailabilityInner inner) { + return new NameAvailabilityImpl(inner, manager()); + } + }); } @Override - public Observable deleteByIdsAsync(Collection ids) { - if (ids == null || ids.isEmpty()) { - return Observable.empty(); - } - Collection> observables = new ArrayList<>(); - for (String id : ids) { - final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id); - final String name = ResourceUtilsCore.nameFromResourceId(id); - Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id); - observables.add(o); - } - return Observable.mergeDelayError(observables); + public Observable listKeysAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.listKeysAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } @Override - public Observable deleteByIdsAsync(String...ids) { - return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids))); + public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.regenerateKeyAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRKeys call(SignalRKeysInner inner) { + return new SignalRKeysImpl(inner, manager()); + } + }); } @Override - public void deleteByIds(Collection ids) { - if (ids != null && !ids.isEmpty()) { - this.deleteByIdsAsync(ids).toBlocking().last(); - } + public Observable getByResourceGroupAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.getByResourceGroupAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); } @Override - public void deleteByIds(String...ids) { - this.deleteByIds(new ArrayList(Arrays.asList(ids))); + public Observable createOrUpdateAsync(String resourceGroupName, String resourceName) { + SignalRsInner client = this.inner(); + return client.createOrUpdateAsync(resourceGroupName, resourceName) + .map(new Func1() { + @Override + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); + } + }); } @Override - public PagedList listByResourceGroup(String resourceGroupName) { + public Completable deleteAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.listByResourceGroup(resourceGroupName)); + return client.deleteAsync(resourceGroupName, resourceName).toCompletable(); } @Override - public Observable listByResourceGroupAsync(String resourceGroupName) { + public Observable updateAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return client.listByResourceGroupAsync(resourceGroupName) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) + return client.updateAsync(resourceGroupName, resourceName) .map(new Func1() { @Override public SignalRResource call(SignalRResourceInner inner) { - return wrapModel(inner); + return new SignalRResourceImpl(inner, manager()); } }); } @Override - public PagedList list() { + public Completable restartAsync(String resourceGroupName, String resourceName) { SignalRsInner client = this.inner(); - return this.wrapList(client.list()); + return client.restartAsync(resourceGroupName, resourceName).toCompletable(); } @Override @@ -117,64 +128,25 @@ public Iterable call(Page page) { .map(new Func1() { @Override public SignalRResource call(SignalRResourceInner inner) { - return wrapModel(inner); + return new SignalRResourceImpl(inner, manager()); } }); } @Override - public SignalRResourceImpl define(String name) { - return wrapModel(name); - } - - @Override - public Observable listKeysAsync(String resourceGroupName, String resourceName) { + public Observable listByResourceGroupAsync(final String resourceGroupName) { SignalRsInner client = this.inner(); - return client.listKeysAsync(resourceGroupName, resourceName) - .map(new Func1() { - @Override - public SignalRKeys call(SignalRKeysInner inner) { - return new SignalRKeysImpl(inner, manager()); - } - }); - } - - @Override - public Observable regenerateKeyAsync(String resourceGroupName, String resourceName) { - SignalRsInner client = this.inner(); - return client.regenerateKeyAsync(resourceGroupName, resourceName) - .map(new Func1() { + return client.listByResourceGroupAsync(resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { @Override - public SignalRKeys call(SignalRKeysInner inner) { - return new SignalRKeysImpl(inner, manager()); + public Iterable call(Page page) { + return page.items(); } - }); - } - - @Override - public Completable restartAsync(String resourceGroupName, String resourceName) { - SignalRsInner client = this.inner(); - return client.restartAsync(resourceGroupName, resourceName).toCompletable(); - } - - @Override - protected SignalRResourceImpl wrapModel(SignalRResourceInner inner) { - return new SignalRResourceImpl(inner.name(), inner, manager()); - } - - @Override - protected SignalRResourceImpl wrapModel(String name) { - return new SignalRResourceImpl(name, new SignalRResourceInner(), this.manager()); - } - - @Override - public Observable checkNameAvailabilityAsync(String location) { - SignalRsInner client = this.inner(); - return client.checkNameAvailabilityAsync(location) - .map(new Func1() { + }) + .map(new Func1() { @Override - public NameAvailability call(NameAvailabilityInner inner) { - return new NameAvailabilityImpl(inner, manager()); + public SignalRResource call(SignalRResourceInner inner) { + return new SignalRResourceImpl(inner, manager()); } }); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java index af45331cea68..5521db970c26 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/SignalRsInner.java @@ -14,8 +14,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.management.signalr.v2018_10_01.KeyType; import com.microsoft.azure.management.signalr.v2018_10_01.NameAvailabilityParameters; import com.microsoft.azure.management.signalr.v2018_10_01.RegenerateKeyParameters; @@ -46,8 +46,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -88,15 +86,15 @@ interface SignalRsService { Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs listKeys" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys") Observable> listKeys(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs regenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey") Observable> regenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs beginRegenerateKey" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey") Observable> beginRegenerateKey(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeyParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.signalr.v2018_10_01.SignalRs getByResourceGroup" }) @@ -150,7 +148,7 @@ interface SignalRsService { * * @param location the region * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NameAvailabilityInner object if successful. */ @@ -224,7 +222,7 @@ public Observable> call(Response> call(Response checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -306,7 +304,7 @@ private ServiceResponse checkNameAvailabilityDelegate(Res * Handles requests to list all resources in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -402,10 +400,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -414,7 +412,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -530,7 +528,7 @@ private ServiceResponse> listByResourceGroupDeleg * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -603,10 +601,10 @@ public Observable> call(Response }); } - private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse listKeysDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -616,7 +614,7 @@ private ServiceResponse listKeysDelegate(Response> regenerateKeyWithServiceRes * @param resourceName The name of the SignalR resource. * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -765,7 +763,7 @@ public Observable> regenerateKeyWithServiceRes * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -848,7 +846,7 @@ public Observable> call(Response * @param resourceName The name of the SignalR resource. * @param keyType The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible values include: 'Primary', 'Secondary' * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRKeysInner object if successful. */ @@ -929,10 +927,10 @@ public Observable> call(Response }); } - private ServiceResponse beginRegenerateKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginRegenerateKeyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -942,7 +940,7 @@ private ServiceResponse beginRegenerateKeyDelegate(Response> call(Response getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1028,7 +1026,7 @@ private ServiceResponse getByResourceGroupDelegate(Respons * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1098,7 +1096,7 @@ public Observable> createOrUpdateWithServi * @param resourceName The name of the SignalR resource. * @param parameters Parameters for the create or update operation * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1171,7 +1169,7 @@ public Observable> createOrUpdateWithServi * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1252,7 +1250,7 @@ public Observable> call(Response> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1343,7 +1342,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respon * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void delete(String resourceGroupName, String resourceName) { @@ -1411,7 +1410,7 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete(String resourceGroupName, String resourceName) { @@ -1483,11 +1482,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1497,7 +1496,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1567,7 +1566,7 @@ public Observable> updateWithServiceRespon * @param resourceName The name of the SignalR resource. * @param parameters Parameters for the update operation * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1640,7 +1639,7 @@ public Observable> updateWithServiceRespon * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SignalRResourceInner object if successful. */ @@ -1721,7 +1720,7 @@ public Observable> call(Response> call(Response beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1812,7 +1811,7 @@ private ServiceResponse beginUpdateDelegate(Response> restartWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param resourceName The name of the SignalR resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginRestart(String resourceGroupName, String resourceName) { @@ -1952,11 +1951,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginRestartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginRestartDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1965,7 +1964,7 @@ private ServiceResponse beginRestartDelegate(Response respon * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -2064,10 +2063,10 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -2076,7 +2075,7 @@ private ServiceResponse> listNextDelegate(Respons * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRResourceInner> object if successful. */ @@ -2175,10 +2174,10 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java index 7d8b34c893b5..1c971f5b65a8 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesImpl.java @@ -17,14 +17,14 @@ import com.microsoft.azure.management.signalr.v2018_10_01.SignalRUsage; class UsagesImpl extends WrapperImpl implements Usages { - private final SignalRManager manager; + private final SignalRServiceManager manager; - UsagesImpl(SignalRManager manager) { + UsagesImpl(SignalRServiceManager manager) { super(manager.inner().usages()); this.manager = manager; } - public SignalRManager manager() { + public SignalRServiceManager manager() { return this.manager; } diff --git a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java index 475fc7a3ae8a..b4497a1727e0 100644 --- a/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java +++ b/sdk/signalr/mgmt-v2018_10_01/src/main/java/com/microsoft/azure/management/signalr/v2018_10_01/implementation/UsagesInner.java @@ -11,8 +11,8 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.signalr.v2018_10_01.ErrorResponseException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceFuture; @@ -71,7 +71,7 @@ interface UsagesService { * * @param location the location like "eastus" * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SignalRUsageInner> object if successful. */ @@ -174,10 +174,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -186,7 +186,7 @@ private ServiceResponse> listDelegate(Response>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); }