diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java index b4ad0a9ad2b..da0f77b0db6 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/AdmCredential.java @@ -35,7 +35,7 @@ public class AdmCredential { private String authTokenUrl; /** - * Get the clientId value. + * Get the client identifier. * * @return the clientId value */ @@ -44,7 +44,7 @@ public String clientId() { } /** - * Set the clientId value. + * Set the client identifier. * * @param clientId the clientId value to set * @return the AdmCredential object itself. @@ -55,7 +55,7 @@ public AdmCredential withClientId(String clientId) { } /** - * Get the clientSecret value. + * Get the credential secret access key. * * @return the clientSecret value */ @@ -64,7 +64,7 @@ public String clientSecret() { } /** - * Set the clientSecret value. + * Set the credential secret access key. * * @param clientSecret the clientSecret value to set * @return the AdmCredential object itself. @@ -75,7 +75,7 @@ public AdmCredential withClientSecret(String clientSecret) { } /** - * Get the authTokenUrl value. + * Get the URL of the authorization token. * * @return the authTokenUrl value */ @@ -84,7 +84,7 @@ public String authTokenUrl() { } /** - * Set the authTokenUrl value. + * Set the URL of the authorization token. * * @param authTokenUrl the authTokenUrl value to set * @return the AdmCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java index 031d1136c55..a8f59e0e231 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ApnsCredential.java @@ -67,7 +67,7 @@ public class ApnsCredential { private String token; /** - * Get the apnsCertificate value. + * Get the APNS certificate. * * @return the apnsCertificate value */ @@ -76,7 +76,7 @@ public String apnsCertificate() { } /** - * Set the apnsCertificate value. + * Set the APNS certificate. * * @param apnsCertificate the apnsCertificate value to set * @return the ApnsCredential object itself. @@ -87,7 +87,7 @@ public ApnsCredential withApnsCertificate(String apnsCertificate) { } /** - * Get the certificateKey value. + * Get the certificate key. * * @return the certificateKey value */ @@ -96,7 +96,7 @@ public String certificateKey() { } /** - * Set the certificateKey value. + * Set the certificate key. * * @param certificateKey the certificateKey value to set * @return the ApnsCredential object itself. @@ -107,7 +107,7 @@ public ApnsCredential withCertificateKey(String certificateKey) { } /** - * Get the endpoint value. + * Get the endpoint of this credential. * * @return the endpoint value */ @@ -116,7 +116,7 @@ public String endpoint() { } /** - * Set the endpoint value. + * Set the endpoint of this credential. * * @param endpoint the endpoint value to set * @return the ApnsCredential object itself. @@ -127,7 +127,7 @@ public ApnsCredential withEndpoint(String endpoint) { } /** - * Get the thumbprint value. + * Get the Apns certificate Thumbprint. * * @return the thumbprint value */ @@ -136,7 +136,7 @@ public String thumbprint() { } /** - * Set the thumbprint value. + * Set the Apns certificate Thumbprint. * * @param thumbprint the thumbprint value to set * @return the ApnsCredential object itself. @@ -147,7 +147,7 @@ public ApnsCredential withThumbprint(String thumbprint) { } /** - * Get the keyId value. + * Get a 10-character key identifier (kid) key, obtained from your developer account. * * @return the keyId value */ @@ -156,7 +156,7 @@ public String keyId() { } /** - * Set the keyId value. + * Set a 10-character key identifier (kid) key, obtained from your developer account. * * @param keyId the keyId value to set * @return the ApnsCredential object itself. @@ -167,7 +167,7 @@ public ApnsCredential withKeyId(String keyId) { } /** - * Get the appName value. + * Get the name of the application. * * @return the appName value */ @@ -176,7 +176,7 @@ public String appName() { } /** - * Set the appName value. + * Set the name of the application. * * @param appName the appName value to set * @return the ApnsCredential object itself. @@ -187,7 +187,7 @@ public ApnsCredential withAppName(String appName) { } /** - * Get the appId value. + * Get the issuer (iss) registered claim key, whose value is your 10-character Team ID, obtained from your developer account. * * @return the appId value */ @@ -196,7 +196,7 @@ public String appId() { } /** - * Set the appId value. + * Set the issuer (iss) registered claim key, whose value is your 10-character Team ID, obtained from your developer account. * * @param appId the appId value to set * @return the ApnsCredential object itself. @@ -207,7 +207,7 @@ public ApnsCredential withAppId(String appId) { } /** - * Get the token value. + * Get provider Authentication Token, obtained through your developer account. * * @return the token value */ @@ -216,7 +216,7 @@ public String token() { } /** - * Set the token value. + * Set provider Authentication Token, obtained through your developer account. * * @param token the token value to set * @return the ApnsCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java index 01a72cc75cc..00f9d855450 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/BaiduCredential.java @@ -35,7 +35,7 @@ public class BaiduCredential { private String baiduSecretKey; /** - * Get the baiduApiKey value. + * Get baidu Api Key. * * @return the baiduApiKey value */ @@ -44,7 +44,7 @@ public String baiduApiKey() { } /** - * Set the baiduApiKey value. + * Set baidu Api Key. * * @param baiduApiKey the baiduApiKey value to set * @return the BaiduCredential object itself. @@ -55,7 +55,7 @@ public BaiduCredential withBaiduApiKey(String baiduApiKey) { } /** - * Get the baiduEndPoint value. + * Get baidu Endpoint. * * @return the baiduEndPoint value */ @@ -64,7 +64,7 @@ public String baiduEndPoint() { } /** - * Set the baiduEndPoint value. + * Set baidu Endpoint. * * @param baiduEndPoint the baiduEndPoint value to set * @return the BaiduCredential object itself. @@ -75,7 +75,7 @@ public BaiduCredential withBaiduEndPoint(String baiduEndPoint) { } /** - * Get the baiduSecretKey value. + * Get baidu Secret Key. * * @return the baiduSecretKey value */ @@ -84,7 +84,7 @@ public String baiduSecretKey() { } /** - * Set the baiduSecretKey value. + * Set baidu Secret Key. * * @param baiduSecretKey the baiduSecretKey value to set * @return the BaiduCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckAvailabilityParameters.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckAvailabilityParameters.java new file mode 100644 index 00000000000..a1de6194872 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/CheckAvailabilityParameters.java @@ -0,0 +1,180 @@ +/** + * 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.notificationhubs; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to the Check Name Availability for Namespace and + * NotificationHubs. + */ +public class CheckAvailabilityParameters { + /** + * Resource Id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Resource name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * True if the name is available and can be used to create new + * Namespace/NotificationHub. Otherwise false. + */ + @JsonProperty(value = "isAvailiable") + private Boolean isAvailiable; + + /** + * Get resource Id. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get resource name. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set resource name. + * + * @param name the name value to set + * @return the CheckAvailabilityParameters object itself. + */ + public CheckAvailabilityParameters withName(String name) { + this.name = name; + return this; + } + + /** + * Get resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get resource location. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set resource location. + * + * @param location the location value to set + * @return the CheckAvailabilityParameters object itself. + */ + public CheckAvailabilityParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the CheckAvailabilityParameters object itself. + */ + public CheckAvailabilityParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the CheckAvailabilityParameters object itself. + */ + public CheckAvailabilityParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. + * + * @return the isAvailiable value + */ + public Boolean isAvailiable() { + return this.isAvailiable; + } + + /** + * Set true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. + * + * @param isAvailiable the isAvailiable value to set + * @return the CheckAvailabilityParameters object itself. + */ + public CheckAvailabilityParameters withIsAvailiable(Boolean isAvailiable) { + this.isAvailiable = isAvailiable; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ErrorResponse.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ErrorResponse.java new file mode 100644 index 00000000000..469106be1a2 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ErrorResponse.java @@ -0,0 +1,70 @@ +/** + * 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.notificationhubs; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Error reponse indicates NotificationHubs service is not able to process the + * incoming request. The reason is provided in the error message. + */ +public class ErrorResponse { + /** + * Error code. + */ + @JsonProperty(value = "code") + private String code; + + /** + * Error message indicating why the operation failed. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get error code. + * + * @return the code value + */ + public String code() { + return this.code; + } + + /** + * Set error code. + * + * @param code the code value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withCode(String code) { + this.code = code; + return this; + } + + /** + * Get error message indicating why the operation failed. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set error message indicating why the operation failed. + * + * @param message the message value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ErrorResponseException.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/ErrorResponseException.java new file mode 100644 index 00000000000..701ff653c27 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/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.notificationhubs; + +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/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java index ff843a9a8b8..1ce239ad655 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/GcmCredential.java @@ -29,7 +29,7 @@ public class GcmCredential { private String googleApiKey; /** - * Get the gcmEndpoint value. + * Get the GCM endpoint. * * @return the gcmEndpoint value */ @@ -38,7 +38,7 @@ public String gcmEndpoint() { } /** - * Set the gcmEndpoint value. + * Set the GCM endpoint. * * @param gcmEndpoint the gcmEndpoint value to set * @return the GcmCredential object itself. @@ -49,7 +49,7 @@ public GcmCredential withGcmEndpoint(String gcmEndpoint) { } /** - * Get the googleApiKey value. + * Get the Google API key. * * @return the googleApiKey value */ @@ -58,7 +58,7 @@ public String googleApiKey() { } /** - * Set the googleApiKey value. + * Set the Google API key. * * @param googleApiKey the googleApiKey value to set * @return the GcmCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java index 339dd4bb5a1..5957c051233 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/MpnsCredential.java @@ -35,7 +35,7 @@ public class MpnsCredential { private String thumbprint; /** - * Get the mpnsCertificate value. + * Get the MPNS certificate. * * @return the mpnsCertificate value */ @@ -44,7 +44,7 @@ public String mpnsCertificate() { } /** - * Set the mpnsCertificate value. + * Set the MPNS certificate. * * @param mpnsCertificate the mpnsCertificate value to set * @return the MpnsCredential object itself. @@ -55,7 +55,7 @@ public MpnsCredential withMpnsCertificate(String mpnsCertificate) { } /** - * Get the certificateKey value. + * Get the certificate key for this credential. * * @return the certificateKey value */ @@ -64,7 +64,7 @@ public String certificateKey() { } /** - * Set the certificateKey value. + * Set the certificate key for this credential. * * @param certificateKey the certificateKey value to set * @return the MpnsCredential object itself. @@ -75,7 +75,7 @@ public MpnsCredential withCertificateKey(String certificateKey) { } /** - * Get the thumbprint value. + * Get the Mpns certificate Thumbprint. * * @return the thumbprint value */ @@ -84,7 +84,7 @@ public String thumbprint() { } /** - * Set the thumbprint value. + * Set the Mpns certificate Thumbprint. * * @param thumbprint the thumbprint value to set * @return the MpnsCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespacePatchParameters.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespacePatchParameters.java new file mode 100644 index 00000000000..fbdf9332d2a --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NamespacePatchParameters.java @@ -0,0 +1,70 @@ +/** + * 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.notificationhubs; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to the Patch Namespace operation. + */ +public class NamespacePatchParameters { + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get resource tags. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set resource tags. + * + * @param tags the tags value to set + * @return the NamespacePatchParameters object itself. + */ + public NamespacePatchParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the NamespacePatchParameters object itself. + */ + public NamespacePatchParameters withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/OperationDisplay.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/OperationDisplay.java new file mode 100644 index 00000000000..3a5d0e9a809 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/OperationDisplay.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. + */ + +package com.microsoft.azure.management.notificationhubs; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The object that represents the operation. + */ +public class OperationDisplay { + /** + * Service provider: Microsoft.NotificationHubs. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /** + * Resource on which the operation is performed: Invoice, etc. + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /** + * Operation type: Read, write, delete, etc. + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /** + * Get service provider: Microsoft.NotificationHubs. + * + * @return the provider value + */ + public String provider() { + return this.provider; + } + + /** + * Get resource on which the operation is performed: Invoice, etc. + * + * @return the resource value + */ + public String resource() { + return this.resource; + } + + /** + * Get operation type: Read, write, delete, etc. + * + * @return the operation value + */ + public String operation() { + return this.operation; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java index 2db39a75544..1b0c75afeeb 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/PolicykeyResource.java @@ -23,7 +23,7 @@ public class PolicykeyResource { private String policyKey; /** - * Get the policyKey value. + * Get name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. * * @return the policyKey value */ @@ -32,7 +32,7 @@ public String policyKey() { } /** - * Set the policyKey value. + * Set name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary Key/Secondary Key. * * @param policyKey the policyKey value to set * @return the PolicykeyResource object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java new file mode 100644 index 00000000000..8041a36dd0c --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleCreateOrUpdateParameters.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.notificationhubs; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules. + */ +public class SharedAccessAuthorizationRuleCreateOrUpdateParameters { + /** + * Properties of the Namespace AuthorizationRules. + */ + @JsonProperty(value = "properties", required = true) + private SharedAccessAuthorizationRuleProperties properties; + + /** + * Get properties of the Namespace AuthorizationRules. + * + * @return the properties value + */ + public SharedAccessAuthorizationRuleProperties properties() { + return this.properties; + } + + /** + * Set properties of the Namespace AuthorizationRules. + * + * @param properties the properties value to set + * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself. + */ + public SharedAccessAuthorizationRuleCreateOrUpdateParameters withProperties(SharedAccessAuthorizationRuleProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java index 2c341a56e00..7a58f8d6ba5 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SharedAccessAuthorizationRuleProperties.java @@ -22,7 +22,57 @@ public class SharedAccessAuthorizationRuleProperties { private List rights; /** - * Get the rights value. + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /** + * A string that describes the authorization rule. + */ + @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY) + private String keyName; + + /** + * A string that describes the claim type. + */ + @JsonProperty(value = "claimType", access = JsonProperty.Access.WRITE_ONLY) + private String claimType; + + /** + * A string that describes the claim value. + */ + @JsonProperty(value = "claimValue", access = JsonProperty.Access.WRITE_ONLY) + private String claimValue; + + /** + * The last modified time for this rule. + */ + @JsonProperty(value = "modifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private String modifiedTime; + + /** + * The created time for this rule. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private String createdTime; + + /** + * The revision number for the rule. + */ + @JsonProperty(value = "revision", access = JsonProperty.Access.WRITE_ONLY) + private Integer revision; + + /** + * Get the rights associated with the rule. * * @return the rights value */ @@ -31,7 +81,7 @@ public List rights() { } /** - * Set the rights value. + * Set the rights associated with the rule. * * @param rights the rights value to set * @return the SharedAccessAuthorizationRuleProperties object itself. @@ -41,4 +91,76 @@ public SharedAccessAuthorizationRuleProperties withRights(List rig return this; } + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Get a string that describes the authorization rule. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Get a string that describes the claim type. + * + * @return the claimType value + */ + public String claimType() { + return this.claimType; + } + + /** + * Get a string that describes the claim value. + * + * @return the claimValue value + */ + public String claimValue() { + return this.claimValue; + } + + /** + * Get the last modified time for this rule. + * + * @return the modifiedTime value + */ + public String modifiedTime() { + return this.modifiedTime; + } + + /** + * Get the created time for this rule. + * + * @return the createdTime value + */ + public String createdTime() { + return this.createdTime; + } + + /** + * Get the revision number for the rule. + * + * @return the revision value + */ + public Integer revision() { + return this.revision; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java index 9a0310d7486..9eda1cd3d13 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/Sku.java @@ -46,7 +46,7 @@ public class Sku { private Integer capacity; /** - * Get the name value. + * Get name of the notification hub sku. Possible values include: 'Free', 'Basic', 'Standard'. * * @return the name value */ @@ -55,7 +55,7 @@ public SkuName name() { } /** - * Set the name value. + * Set name of the notification hub sku. Possible values include: 'Free', 'Basic', 'Standard'. * * @param name the name value to set * @return the Sku object itself. @@ -66,7 +66,7 @@ public Sku withName(SkuName name) { } /** - * Get the tier value. + * Get the tier of particular sku. * * @return the tier value */ @@ -75,7 +75,7 @@ public String tier() { } /** - * Set the tier value. + * Set the tier of particular sku. * * @param tier the tier value to set * @return the Sku object itself. @@ -86,7 +86,7 @@ public Sku withTier(String tier) { } /** - * Get the size value. + * Get the Sku size. * * @return the size value */ @@ -95,7 +95,7 @@ public String size() { } /** - * Set the size value. + * Set the Sku size. * * @param size the size value to set * @return the Sku object itself. @@ -106,7 +106,7 @@ public Sku withSize(String size) { } /** - * Get the family value. + * Get the Sku Family. * * @return the family value */ @@ -115,7 +115,7 @@ public String family() { } /** - * Set the family value. + * Set the Sku Family. * * @param family the family value to set * @return the Sku object itself. @@ -126,7 +126,7 @@ public Sku withFamily(String family) { } /** - * Get the capacity value. + * Get the capacity of the resource. * * @return the capacity value */ @@ -135,7 +135,7 @@ public Integer capacity() { } /** - * Set the capacity value. + * Set the capacity of the resource. * * @param capacity the capacity value to set * @return the Sku object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java index 8c3bb8f07ba..58d17241431 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/SkuName.java @@ -8,55 +8,37 @@ package com.microsoft.azure.management.notificationhubs; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SkuName. */ -public final class SkuName { +public final class SkuName extends ExpandableStringEnum { /** Static value Free for SkuName. */ - public static final SkuName FREE = new SkuName("Free"); + public static final SkuName FREE = fromString("Free"); /** Static value Basic for SkuName. */ - public static final SkuName BASIC = new SkuName("Basic"); + public static final SkuName BASIC = fromString("Basic"); /** Static value Standard for SkuName. */ - public static final SkuName STANDARD = new SkuName("Standard"); - - private String value; + public static final SkuName STANDARD = fromString("Standard"); /** - * Creates a custom value for SkuName. - * @param value the custom value + * Creates or finds a SkuName from its string representation. + * @param name a name to look for + * @return the corresponding SkuName */ - public SkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); } - @Override - public int hashCode() { - return value.hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof SkuName)) { - return false; - } - if (obj == this) { - return true; - } - SkuName rhs = (SkuName) obj; - if (value == null) { - return rhs.value == null; - } else { - return value.equals(rhs.value); - } + /** + * @return known SkuName values + */ + public static Collection values() { + return values(SkuName.class); } } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java index 72da56f715a..42188a9c5d0 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/WnsCredential.java @@ -35,7 +35,7 @@ public class WnsCredential { private String windowsLiveEndpoint; /** - * Get the packageSid value. + * Get the package ID for this credential. * * @return the packageSid value */ @@ -44,7 +44,7 @@ public String packageSid() { } /** - * Set the packageSid value. + * Set the package ID for this credential. * * @param packageSid the packageSid value to set * @return the WnsCredential object itself. @@ -55,7 +55,7 @@ public WnsCredential withPackageSid(String packageSid) { } /** - * Get the secretKey value. + * Get the secret key. * * @return the secretKey value */ @@ -64,7 +64,7 @@ public String secretKey() { } /** - * Set the secretKey value. + * Set the secret key. * * @param secretKey the secretKey value to set * @return the WnsCredential object itself. @@ -75,7 +75,7 @@ public WnsCredential withSecretKey(String secretKey) { } /** - * Get the windowsLiveEndpoint value. + * Get the Windows Live endpoint. * * @return the windowsLiveEndpoint value */ @@ -84,7 +84,7 @@ public String windowsLiveEndpoint() { } /** - * Set the windowsLiveEndpoint value. + * Set the Windows Live endpoint. * * @param windowsLiveEndpoint the windowsLiveEndpoint value to set * @return the WnsCredential object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java index 8cd7a5ed5c2..406cc10c37e 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/CheckAvailabilityResultInner.java @@ -8,12 +8,15 @@ package com.microsoft.azure.management.notificationhubs.implementation; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Description of a CheckAvailibility resource. */ +@SkipParentValidation public class CheckAvailabilityResultInner extends Resource { /** * True if the name is available and can be used to create new @@ -23,7 +26,13 @@ public class CheckAvailabilityResultInner extends Resource { private Boolean isAvailiable; /** - * Get the isAvailiable value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. * * @return the isAvailiable value */ @@ -32,7 +41,7 @@ public Boolean isAvailiable() { } /** - * Set the isAvailiable value. + * Set true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. * * @param isAvailiable the isAvailiable value to set * @return the CheckAvailabilityResultInner object itself. @@ -42,4 +51,24 @@ public CheckAvailabilityResultInner withIsAvailiable(Boolean isAvailiable) { return this; } + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the CheckAvailabilityResultInner object itself. + */ + public CheckAvailabilityResultInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/DebugSendResponseInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/DebugSendResponseInner.java new file mode 100644 index 00000000000..1ed7b38d587 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/DebugSendResponseInner.java @@ -0,0 +1,127 @@ +/** + * 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.notificationhubs.implementation; + +import com.microsoft.azure.management.notificationhubs.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Description of a NotificationHub Resource. + */ +@JsonFlatten +@SkipParentValidation +public class DebugSendResponseInner extends Resource { + /** + * successful send. + */ + @JsonProperty(value = "properties.success") + private Double success; + + /** + * send failure. + */ + @JsonProperty(value = "properties.failure") + private Double failure; + + /** + * actual failure description. + */ + @JsonProperty(value = "properties.results") + private Object results; + + /** + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get successful send. + * + * @return the success value + */ + public Double success() { + return this.success; + } + + /** + * Set successful send. + * + * @param success the success value to set + * @return the DebugSendResponseInner object itself. + */ + public DebugSendResponseInner withSuccess(Double success) { + this.success = success; + return this; + } + + /** + * Get send failure. + * + * @return the failure value + */ + public Double failure() { + return this.failure; + } + + /** + * Set send failure. + * + * @param failure the failure value to set + * @return the DebugSendResponseInner object itself. + */ + public DebugSendResponseInner withFailure(Double failure) { + this.failure = failure; + return this; + } + + /** + * Get actual failure description. + * + * @return the results value + */ + public Object results() { + return this.results; + } + + /** + * Set actual failure description. + * + * @param results the results value to set + * @return the DebugSendResponseInner object itself. + */ + public DebugSendResponseInner withResults(Object results) { + this.results = results; + return this; + } + + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the DebugSendResponseInner object itself. + */ + public DebugSendResponseInner withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java index 0ae0706f893..c42012f9478 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceCreateOrUpdateParametersInner.java @@ -10,14 +10,17 @@ import org.joda.time.DateTime; import com.microsoft.azure.management.notificationhubs.NamespaceType; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Parameters supplied to the CreateOrUpdate Namespace operation. */ @JsonFlatten +@SkipParentValidation public class NamespaceCreateOrUpdateParametersInner extends Resource { /** * The name of the namespace. @@ -41,6 +44,12 @@ public class NamespaceCreateOrUpdateParametersInner extends Resource { @JsonProperty(value = "properties.region") private String region; + /** + * Identifier for Azure Insights metrics. + */ + @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY) + private String metricId; + /** * Status of the namespace. It can be any of these values:1 = * Created/Active2 = Creating3 = Suspended4 = Deleting. @@ -54,6 +63,12 @@ public class NamespaceCreateOrUpdateParametersInner extends Resource { @JsonProperty(value = "properties.createdAt") private DateTime createdAt; + /** + * The time the namespace was updated. + */ + @JsonProperty(value = "properties.updatedAt") + private DateTime updatedAt; + /** * Endpoint you can use to perform NotificationHub operations. */ @@ -84,6 +99,12 @@ public class NamespaceCreateOrUpdateParametersInner extends Resource { @JsonProperty(value = "properties.critical") private Boolean critical; + /** + * Data center for the namespace. + */ + @JsonProperty(value = "properties.dataCenter") + private String dataCenter; + /** * The namespace type. Possible values include: 'Messaging', * 'NotificationHub'. @@ -92,7 +113,13 @@ public class NamespaceCreateOrUpdateParametersInner extends Resource { private NamespaceType namespaceType; /** - * Get the namespaceCreateOrUpdateParametersName value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the name of the namespace. * * @return the namespaceCreateOrUpdateParametersName value */ @@ -101,7 +128,7 @@ public String namespaceCreateOrUpdateParametersName() { } /** - * Set the namespaceCreateOrUpdateParametersName value. + * Set the name of the namespace. * * @param namespaceCreateOrUpdateParametersName the namespaceCreateOrUpdateParametersName value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -112,7 +139,7 @@ public NamespaceCreateOrUpdateParametersInner withNamespaceCreateOrUpdateParamet } /** - * Get the provisioningState value. + * Get provisioning state of the Namespace. * * @return the provisioningState value */ @@ -121,7 +148,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set provisioning state of the Namespace. * * @param provisioningState the provisioningState value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -132,7 +159,7 @@ public NamespaceCreateOrUpdateParametersInner withProvisioningState(String provi } /** - * Get the region value. + * Get specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe. * * @return the region value */ @@ -141,7 +168,7 @@ public String region() { } /** - * Set the region value. + * Set specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe. * * @param region the region value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -152,7 +179,16 @@ public NamespaceCreateOrUpdateParametersInner withRegion(String region) { } /** - * Get the status value. + * Get identifier for Azure Insights metrics. + * + * @return the metricId value + */ + public String metricId() { + return this.metricId; + } + + /** + * Get status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. * * @return the status value */ @@ -161,7 +197,7 @@ public String status() { } /** - * Set the status value. + * Set status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. * * @param status the status value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -172,7 +208,7 @@ public NamespaceCreateOrUpdateParametersInner withStatus(String status) { } /** - * Get the createdAt value. + * Get the time the namespace was created. * * @return the createdAt value */ @@ -181,7 +217,7 @@ public DateTime createdAt() { } /** - * Set the createdAt value. + * Set the time the namespace was created. * * @param createdAt the createdAt value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -192,7 +228,27 @@ public NamespaceCreateOrUpdateParametersInner withCreatedAt(DateTime createdAt) } /** - * Get the serviceBusEndpoint value. + * Get the time the namespace was updated. + * + * @return the updatedAt value + */ + public DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Set the time the namespace was updated. + * + * @param updatedAt the updatedAt value to set + * @return the NamespaceCreateOrUpdateParametersInner object itself. + */ + public NamespaceCreateOrUpdateParametersInner withUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get endpoint you can use to perform NotificationHub operations. * * @return the serviceBusEndpoint value */ @@ -201,7 +257,7 @@ public String serviceBusEndpoint() { } /** - * Set the serviceBusEndpoint value. + * Set endpoint you can use to perform NotificationHub operations. * * @param serviceBusEndpoint the serviceBusEndpoint value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -212,7 +268,7 @@ public NamespaceCreateOrUpdateParametersInner withServiceBusEndpoint(String serv } /** - * Get the subscriptionId value. + * Get the Id of the Azure subscription associated with the namespace. * * @return the subscriptionId value */ @@ -221,7 +277,7 @@ public String subscriptionId() { } /** - * Set the subscriptionId value. + * Set the Id of the Azure subscription associated with the namespace. * * @param subscriptionId the subscriptionId value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -232,7 +288,7 @@ public NamespaceCreateOrUpdateParametersInner withSubscriptionId(String subscrip } /** - * Get the scaleUnit value. + * Get scaleUnit where the namespace gets created. * * @return the scaleUnit value */ @@ -241,7 +297,7 @@ public String scaleUnit() { } /** - * Set the scaleUnit value. + * Set scaleUnit where the namespace gets created. * * @param scaleUnit the scaleUnit value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -252,7 +308,7 @@ public NamespaceCreateOrUpdateParametersInner withScaleUnit(String scaleUnit) { } /** - * Get the enabled value. + * Get whether or not the namespace is currently enabled. * * @return the enabled value */ @@ -261,7 +317,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set whether or not the namespace is currently enabled. * * @param enabled the enabled value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -272,7 +328,7 @@ public NamespaceCreateOrUpdateParametersInner withEnabled(Boolean enabled) { } /** - * Get the critical value. + * Get whether or not the namespace is set as Critical. * * @return the critical value */ @@ -281,7 +337,7 @@ public Boolean critical() { } /** - * Set the critical value. + * Set whether or not the namespace is set as Critical. * * @param critical the critical value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -292,7 +348,27 @@ public NamespaceCreateOrUpdateParametersInner withCritical(Boolean critical) { } /** - * Get the namespaceType value. + * Get data center for the namespace. + * + * @return the dataCenter value + */ + public String dataCenter() { + return this.dataCenter; + } + + /** + * Set data center for the namespace. + * + * @param dataCenter the dataCenter value to set + * @return the NamespaceCreateOrUpdateParametersInner object itself. + */ + public NamespaceCreateOrUpdateParametersInner withDataCenter(String dataCenter) { + this.dataCenter = dataCenter; + return this; + } + + /** + * Get the namespace type. Possible values include: 'Messaging', 'NotificationHub'. * * @return the namespaceType value */ @@ -301,7 +377,7 @@ public NamespaceType namespaceType() { } /** - * Set the namespaceType value. + * Set the namespace type. Possible values include: 'Messaging', 'NotificationHub'. * * @param namespaceType the namespaceType value to set * @return the NamespaceCreateOrUpdateParametersInner object itself. @@ -311,4 +387,24 @@ public NamespaceCreateOrUpdateParametersInner withNamespaceType(NamespaceType na return this; } + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the NamespaceCreateOrUpdateParametersInner object itself. + */ + public NamespaceCreateOrUpdateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java index 56cc9cae0c1..49de12ff6a1 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespaceResourceInner.java @@ -10,14 +10,17 @@ import org.joda.time.DateTime; import com.microsoft.azure.management.notificationhubs.NamespaceType; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Description of a Namespace resource. */ @JsonFlatten +@SkipParentValidation public class NamespaceResourceInner extends Resource { /** * The name of the namespace. @@ -41,6 +44,12 @@ public class NamespaceResourceInner extends Resource { @JsonProperty(value = "properties.region") private String region; + /** + * Identifier for Azure Insights metrics. + */ + @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY) + private String metricId; + /** * Status of the namespace. It can be any of these values:1 = * Created/Active2 = Creating3 = Suspended4 = Deleting. @@ -54,6 +63,12 @@ public class NamespaceResourceInner extends Resource { @JsonProperty(value = "properties.createdAt") private DateTime createdAt; + /** + * The time the namespace was updated. + */ + @JsonProperty(value = "properties.updatedAt") + private DateTime updatedAt; + /** * Endpoint you can use to perform NotificationHub operations. */ @@ -84,6 +99,12 @@ public class NamespaceResourceInner extends Resource { @JsonProperty(value = "properties.critical") private Boolean critical; + /** + * Data center for the namespace. + */ + @JsonProperty(value = "properties.dataCenter") + private String dataCenter; + /** * The namespace type. Possible values include: 'Messaging', * 'NotificationHub'. @@ -92,7 +113,13 @@ public class NamespaceResourceInner extends Resource { private NamespaceType namespaceType; /** - * Get the namespaceResourceName value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the name of the namespace. * * @return the namespaceResourceName value */ @@ -101,7 +128,7 @@ public String namespaceResourceName() { } /** - * Set the namespaceResourceName value. + * Set the name of the namespace. * * @param namespaceResourceName the namespaceResourceName value to set * @return the NamespaceResourceInner object itself. @@ -112,7 +139,7 @@ public NamespaceResourceInner withNamespaceResourceName(String namespaceResource } /** - * Get the provisioningState value. + * Get provisioning state of the Namespace. * * @return the provisioningState value */ @@ -121,7 +148,7 @@ public String provisioningState() { } /** - * Set the provisioningState value. + * Set provisioning state of the Namespace. * * @param provisioningState the provisioningState value to set * @return the NamespaceResourceInner object itself. @@ -132,7 +159,7 @@ public NamespaceResourceInner withProvisioningState(String provisioningState) { } /** - * Get the region value. + * Get specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe. * * @return the region value */ @@ -141,7 +168,7 @@ public String region() { } /** - * Set the region value. + * Set specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan WestNorth EuropeWest Europe. * * @param region the region value to set * @return the NamespaceResourceInner object itself. @@ -152,7 +179,16 @@ public NamespaceResourceInner withRegion(String region) { } /** - * Get the status value. + * Get identifier for Azure Insights metrics. + * + * @return the metricId value + */ + public String metricId() { + return this.metricId; + } + + /** + * Get status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. * * @return the status value */ @@ -161,7 +197,7 @@ public String status() { } /** - * Set the status value. + * Set status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting. * * @param status the status value to set * @return the NamespaceResourceInner object itself. @@ -172,7 +208,7 @@ public NamespaceResourceInner withStatus(String status) { } /** - * Get the createdAt value. + * Get the time the namespace was created. * * @return the createdAt value */ @@ -181,7 +217,7 @@ public DateTime createdAt() { } /** - * Set the createdAt value. + * Set the time the namespace was created. * * @param createdAt the createdAt value to set * @return the NamespaceResourceInner object itself. @@ -192,7 +228,27 @@ public NamespaceResourceInner withCreatedAt(DateTime createdAt) { } /** - * Get the serviceBusEndpoint value. + * Get the time the namespace was updated. + * + * @return the updatedAt value + */ + public DateTime updatedAt() { + return this.updatedAt; + } + + /** + * Set the time the namespace was updated. + * + * @param updatedAt the updatedAt value to set + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withUpdatedAt(DateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get endpoint you can use to perform NotificationHub operations. * * @return the serviceBusEndpoint value */ @@ -201,7 +257,7 @@ public String serviceBusEndpoint() { } /** - * Set the serviceBusEndpoint value. + * Set endpoint you can use to perform NotificationHub operations. * * @param serviceBusEndpoint the serviceBusEndpoint value to set * @return the NamespaceResourceInner object itself. @@ -212,7 +268,7 @@ public NamespaceResourceInner withServiceBusEndpoint(String serviceBusEndpoint) } /** - * Get the subscriptionId value. + * Get the Id of the Azure subscription associated with the namespace. * * @return the subscriptionId value */ @@ -221,7 +277,7 @@ public String subscriptionId() { } /** - * Set the subscriptionId value. + * Set the Id of the Azure subscription associated with the namespace. * * @param subscriptionId the subscriptionId value to set * @return the NamespaceResourceInner object itself. @@ -232,7 +288,7 @@ public NamespaceResourceInner withSubscriptionId(String subscriptionId) { } /** - * Get the scaleUnit value. + * Get scaleUnit where the namespace gets created. * * @return the scaleUnit value */ @@ -241,7 +297,7 @@ public String scaleUnit() { } /** - * Set the scaleUnit value. + * Set scaleUnit where the namespace gets created. * * @param scaleUnit the scaleUnit value to set * @return the NamespaceResourceInner object itself. @@ -252,7 +308,7 @@ public NamespaceResourceInner withScaleUnit(String scaleUnit) { } /** - * Get the enabled value. + * Get whether or not the namespace is currently enabled. * * @return the enabled value */ @@ -261,7 +317,7 @@ public Boolean enabled() { } /** - * Set the enabled value. + * Set whether or not the namespace is currently enabled. * * @param enabled the enabled value to set * @return the NamespaceResourceInner object itself. @@ -272,7 +328,7 @@ public NamespaceResourceInner withEnabled(Boolean enabled) { } /** - * Get the critical value. + * Get whether or not the namespace is set as Critical. * * @return the critical value */ @@ -281,7 +337,7 @@ public Boolean critical() { } /** - * Set the critical value. + * Set whether or not the namespace is set as Critical. * * @param critical the critical value to set * @return the NamespaceResourceInner object itself. @@ -292,7 +348,27 @@ public NamespaceResourceInner withCritical(Boolean critical) { } /** - * Get the namespaceType value. + * Get data center for the namespace. + * + * @return the dataCenter value + */ + public String dataCenter() { + return this.dataCenter; + } + + /** + * Set data center for the namespace. + * + * @param dataCenter the dataCenter value to set + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withDataCenter(String dataCenter) { + this.dataCenter = dataCenter; + return this; + } + + /** + * Get the namespace type. Possible values include: 'Messaging', 'NotificationHub'. * * @return the namespaceType value */ @@ -301,7 +377,7 @@ public NamespaceType namespaceType() { } /** - * Set the namespaceType value. + * Set the namespace type. Possible values include: 'Messaging', 'NotificationHub'. * * @param namespaceType the namespaceType value to set * @return the NamespaceResourceInner object itself. @@ -311,4 +387,24 @@ public NamespaceResourceInner withNamespaceType(NamespaceType namespaceType) { return this; } + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the NamespaceResourceInner object itself. + */ + public NamespaceResourceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java index b6254f0969d..8682468e8ee 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NamespacesInner.java @@ -10,12 +10,17 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; 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.notificationhubs.CheckAvailabilityParameters; +import com.microsoft.azure.management.notificationhubs.NamespacePatchParameters; import com.microsoft.azure.management.notificationhubs.PolicykeyResource; +import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleCreateOrUpdateParameters; +import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleProperties; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -44,7 +49,7 @@ * An instance of this class provides access to all the operations defined * in Namespaces. */ -public class NamespacesInner implements InnerSupportsGet, InnerSupportsDelete { +public class NamespacesInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private NamespacesService service; /** The service client containing this operation class. */ @@ -68,7 +73,7 @@ public NamespacesInner(Retrofit retrofit, NotificationHubsManagementClientImpl c interface NamespacesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces checkAvailability" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability") - Observable> checkAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkAvailability(@Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParameters 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.notificationhubs.Namespaces createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}") @@ -76,7 +81,7 @@ interface NamespacesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces patch" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}") - Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body NamespacePatchParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body NamespacePatchParameters 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.notificationhubs.Namespaces delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}", method = "DELETE", hasBody = true) @@ -92,7 +97,7 @@ interface NamespacesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces createOrUpdateAuthorizationRule" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces deleteAuthorizationRule" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) @@ -102,13 +107,13 @@ interface NamespacesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}") Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @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.notificationhubs.Namespaces list" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @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.notificationhubs.Namespaces listAll" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces") - Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @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.notificationhubs.Namespaces listAuthorizationRules" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules") @@ -122,13 +127,13 @@ interface NamespacesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys") Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PolicykeyResource parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listByResourceGroupNext" }) @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByResourceGroupNext(@Url String nextUrl, @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.notificationhubs.Namespaces listAllNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Namespaces listNext" }) @GET - Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @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.notificationhubs.Namespaces listAuthorizationRulesNext" }) @GET @@ -145,7 +150,7 @@ interface NamespacesService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the CheckAvailabilityResultInner object if successful. */ - public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParametersInner parameters) { + public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameters parameters) { return checkAvailabilityWithServiceResponseAsync(parameters).toBlocking().single().body(); } @@ -157,7 +162,7 @@ public CheckAvailabilityResultInner checkAvailability(CheckAvailabilityParameter * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkAvailabilityAsync(CheckAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture checkAvailabilityAsync(CheckAvailabilityParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(parameters), serviceCallback); } @@ -168,7 +173,7 @@ public ServiceFuture checkAvailabilityAsync(CheckA * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CheckAvailabilityResultInner object */ - public Observable checkAvailabilityAsync(CheckAvailabilityParametersInner parameters) { + public Observable checkAvailabilityAsync(CheckAvailabilityParameters parameters) { return checkAvailabilityWithServiceResponseAsync(parameters).map(new Func1, CheckAvailabilityResultInner>() { @Override public CheckAvailabilityResultInner call(ServiceResponse response) { @@ -184,7 +189,7 @@ public CheckAvailabilityResultInner call(ServiceResponse> checkAvailabilityWithServiceResponseAsync(CheckAvailabilityParametersInner parameters) { + public Observable> checkAvailabilityWithServiceResponseAsync(CheckAvailabilityParameters parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -305,8 +310,8 @@ public Observable> call(Response createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -322,7 +327,7 @@ private ServiceResponse createOrUpdateDelegate(Response< * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NamespaceResourceInner object if successful. */ - public NamespaceResourceInner patch(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { + public NamespaceResourceInner patch(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) { return patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); } @@ -336,7 +341,7 @@ public NamespaceResourceInner patch(String resourceGroupName, String namespaceNa * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters, final ServiceCallback serviceCallback) { + public ServiceFuture patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); } @@ -349,7 +354,7 @@ public ServiceFuture patchAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the NamespaceResourceInner object */ - public Observable patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { + public Observable patchAsync(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) { return patchWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NamespaceResourceInner>() { @Override public NamespaceResourceInner call(ServiceResponse response) { @@ -367,7 +372,7 @@ public NamespaceResourceInner call(ServiceResponse respo * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the NamespaceResourceInner object */ - public Observable> patchWithServiceResponseAsync(String resourceGroupName, String namespaceName, NamespacePatchParametersInner parameters) { + public Observable> patchWithServiceResponseAsync(String resourceGroupName, String namespaceName, NamespacePatchParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -553,9 +558,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -652,14 +657,14 @@ private ServiceResponse getByResourceGroupDelegate(Respo * @param resourceGroupName The name of the resource group. * @param namespaceName The namespace name. * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. + * @param properties Properties of the Namespace AuthorizationRules. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SharedAccessAuthorizationRuleResourceInner object if successful. */ - public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).toBlocking().single().body(); + public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, properties).toBlocking().single().body(); } /** @@ -668,13 +673,13 @@ public SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRul * @param resourceGroupName The name of the resource group. * @param namespaceName The namespace name. * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. + * @param properties Properties of the Namespace AuthorizationRules. * @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 createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters), serviceCallback); + public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, properties), serviceCallback); } /** @@ -683,12 +688,12 @@ public ServiceFuture createOrUpdateA * @param resourceGroupName The name of the resource group. * @param namespaceName The namespace name. * @param authorizationRuleName Aauthorization Rule Name. - * @param parameters The shared access authorization rule. + * @param properties Properties of the Namespace AuthorizationRules. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SharedAccessAuthorizationRuleResourceInner object */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { + public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, properties).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { @Override public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { return response.body(); @@ -702,11 +707,11 @@ public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { + public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -719,14 +724,16 @@ public Observable> c if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters 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.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters = new SharedAccessAuthorizationRuleCreateOrUpdateParameters(); + parameters.withProperties(properties); + return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -834,8 +841,8 @@ public Observable> call(Response response) { private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -942,12 +949,12 @@ private ServiceResponse getAuthoriza * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<NamespaceResourceInner> object if successful. */ - public PagedList list(final String resourceGroupName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -960,13 +967,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName), + listByResourceGroupSinglePageAsync(resourceGroupName), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -979,8 +986,8 @@ public Observable>> call(String nex * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<NamespaceResourceInner> object */ - public Observable> listAsync(final String resourceGroupName) { - return listWithServiceResponseAsync(resourceGroupName) + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -996,8 +1003,8 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync(final String resourceGroupName) { - return listSinglePageAsync(resourceGroupName) + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1005,7 +1012,7 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1017,7 +1024,7 @@ public Observable>> call(ServiceRes * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1027,12 +1034,12 @@ public Observable>> listSinglePageA if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } - return service.list(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); + ServiceResponse> result = listByResourceGroupDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1041,7 +1048,7 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -1056,12 +1063,12 @@ private ServiceResponse> listDelegate(Response< * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<NamespaceResourceInner> object if successful. */ - public PagedList listAll() { - ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1073,13 +1080,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1091,8 +1098,8 @@ public Observable>> call(String nex * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<NamespaceResourceInner> object */ - public Observable> listAllAsync() { - return listAllWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1107,8 +1114,8 @@ public Page call(ServiceResponse>> listAllWithServiceResponseAsync() { - return listAllSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1116,7 +1123,7 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1127,19 +1134,19 @@ public Observable>> call(ServiceRes * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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.listAll(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1148,7 +1155,7 @@ public Observable>> call(Response> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -1287,9 +1294,9 @@ private ServiceResponse> li * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ResourceListKeysInner object if successful. + * @return the SharedAccessAuthorizationRuleListResultInner object if successful. */ - public ResourceListKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { + public SharedAccessAuthorizationRuleListResultInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) { return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body(); } @@ -1303,7 +1310,7 @@ public ResourceListKeysInner listKeys(String resourceGroupName, String namespace * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { + public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback); } @@ -1314,12 +1321,12 @@ public ServiceFuture listKeysAsync(String resourceGroupNa * @param namespaceName The namespace name. * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object + * @return the observable to the SharedAccessAuthorizationRuleListResultInner object */ - public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { - return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, ResourceListKeysInner>() { + public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, SharedAccessAuthorizationRuleListResultInner>() { @Override - public ResourceListKeysInner call(ServiceResponse response) { + public SharedAccessAuthorizationRuleListResultInner call(ServiceResponse response) { return response.body(); } }); @@ -1332,9 +1339,9 @@ public ResourceListKeysInner call(ServiceResponse respons * @param namespaceName The namespace name. * @param authorizationRuleName The connection string of the namespace for the specified authorizationRule. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ResourceListKeysInner object + * @return the observable to the SharedAccessAuthorizationRuleListResultInner object */ - public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { + public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1351,11 +1358,11 @@ public Observable> listKeysWithServiceRes throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = listKeysDelegate(response); + ServiceResponse clientResponse = listKeysDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1364,9 +1371,9 @@ public Observable> call(Response listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listKeysDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1568,12 +1575,12 @@ private ServiceResponse regenerateKeysDelegate(Response listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1587,13 +1594,13 @@ public Page nextPage(String nextPageLink) { * @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) { + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), + listByResourceGroupNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1606,8 +1613,8 @@ public Observable>> call(String nex * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<NamespaceResourceInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1623,8 +1630,8 @@ public Page call(ServiceResponse>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1632,7 +1639,7 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1644,17 +1651,17 @@ public Observable>> call(ServiceRes * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listByResourceGroupNextSinglePageAsync(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()) + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listByResourceGroupNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1663,7 +1670,7 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -1679,12 +1686,12 @@ private ServiceResponse> listNextDelegate(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<NamespaceResourceInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) { - ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1698,13 +1705,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1717,8 +1724,8 @@ public Observable>> call(String nex * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<NamespaceResourceInner> object */ - public Observable> listAllNextAsync(final String nextPageLink) { - return listAllNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1734,8 +1741,8 @@ public Page call(ServiceResponse>> listAllNextWithServiceResponseAsync(final String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1743,7 +1750,7 @@ public Observable>> call(ServiceRes if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1755,17 +1762,17 @@ public Observable>> call(ServiceRes * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<NamespaceResourceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { + 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.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1774,7 +1781,7 @@ public Observable>> call(Response> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java index ea84a1fd8b6..65d150ceba0 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubCreateOrUpdateParametersInner.java @@ -16,14 +16,17 @@ import com.microsoft.azure.management.notificationhubs.MpnsCredential; import com.microsoft.azure.management.notificationhubs.AdmCredential; import com.microsoft.azure.management.notificationhubs.BaiduCredential; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Parameters supplied to the CreateOrUpdate NotificationHub operation. */ @JsonFlatten +@SkipParentValidation public class NotificationHubCreateOrUpdateParametersInner extends Resource { /** * The NotificationHub name. @@ -80,7 +83,13 @@ public class NotificationHubCreateOrUpdateParametersInner extends Resource { private BaiduCredential baiduCredential; /** - * Get the notificationHubCreateOrUpdateParametersName value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the NotificationHub name. * * @return the notificationHubCreateOrUpdateParametersName value */ @@ -89,7 +98,7 @@ public String notificationHubCreateOrUpdateParametersName() { } /** - * Set the notificationHubCreateOrUpdateParametersName value. + * Set the NotificationHub name. * * @param notificationHubCreateOrUpdateParametersName the notificationHubCreateOrUpdateParametersName value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -100,7 +109,7 @@ public NotificationHubCreateOrUpdateParametersInner withNotificationHubCreateOrU } /** - * Get the registrationTtl value. + * Get the RegistrationTtl of the created NotificationHub. * * @return the registrationTtl value */ @@ -109,7 +118,7 @@ public String registrationTtl() { } /** - * Set the registrationTtl value. + * Set the RegistrationTtl of the created NotificationHub. * * @param registrationTtl the registrationTtl value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -120,7 +129,7 @@ public NotificationHubCreateOrUpdateParametersInner withRegistrationTtl(String r } /** - * Get the authorizationRules value. + * Get the AuthorizationRules of the created NotificationHub. * * @return the authorizationRules value */ @@ -129,7 +138,7 @@ public List authorizationRules() { } /** - * Set the authorizationRules value. + * Set the AuthorizationRules of the created NotificationHub. * * @param authorizationRules the authorizationRules value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -140,7 +149,7 @@ public NotificationHubCreateOrUpdateParametersInner withAuthorizationRules(List< } /** - * Get the apnsCredential value. + * Get the ApnsCredential of the created NotificationHub. * * @return the apnsCredential value */ @@ -149,7 +158,7 @@ public ApnsCredential apnsCredential() { } /** - * Set the apnsCredential value. + * Set the ApnsCredential of the created NotificationHub. * * @param apnsCredential the apnsCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -160,7 +169,7 @@ public NotificationHubCreateOrUpdateParametersInner withApnsCredential(ApnsCrede } /** - * Get the wnsCredential value. + * Get the WnsCredential of the created NotificationHub. * * @return the wnsCredential value */ @@ -169,7 +178,7 @@ public WnsCredential wnsCredential() { } /** - * Set the wnsCredential value. + * Set the WnsCredential of the created NotificationHub. * * @param wnsCredential the wnsCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -180,7 +189,7 @@ public NotificationHubCreateOrUpdateParametersInner withWnsCredential(WnsCredent } /** - * Get the gcmCredential value. + * Get the GcmCredential of the created NotificationHub. * * @return the gcmCredential value */ @@ -189,7 +198,7 @@ public GcmCredential gcmCredential() { } /** - * Set the gcmCredential value. + * Set the GcmCredential of the created NotificationHub. * * @param gcmCredential the gcmCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -200,7 +209,7 @@ public NotificationHubCreateOrUpdateParametersInner withGcmCredential(GcmCredent } /** - * Get the mpnsCredential value. + * Get the MpnsCredential of the created NotificationHub. * * @return the mpnsCredential value */ @@ -209,7 +218,7 @@ public MpnsCredential mpnsCredential() { } /** - * Set the mpnsCredential value. + * Set the MpnsCredential of the created NotificationHub. * * @param mpnsCredential the mpnsCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -220,7 +229,7 @@ public NotificationHubCreateOrUpdateParametersInner withMpnsCredential(MpnsCrede } /** - * Get the admCredential value. + * Get the AdmCredential of the created NotificationHub. * * @return the admCredential value */ @@ -229,7 +238,7 @@ public AdmCredential admCredential() { } /** - * Set the admCredential value. + * Set the AdmCredential of the created NotificationHub. * * @param admCredential the admCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -240,7 +249,7 @@ public NotificationHubCreateOrUpdateParametersInner withAdmCredential(AdmCredent } /** - * Get the baiduCredential value. + * Get the BaiduCredential of the created NotificationHub. * * @return the baiduCredential value */ @@ -249,7 +258,7 @@ public BaiduCredential baiduCredential() { } /** - * Set the baiduCredential value. + * Set the BaiduCredential of the created NotificationHub. * * @param baiduCredential the baiduCredential value to set * @return the NotificationHubCreateOrUpdateParametersInner object itself. @@ -259,4 +268,24 @@ public NotificationHubCreateOrUpdateParametersInner withBaiduCredential(BaiduCre return this; } + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the NotificationHubCreateOrUpdateParametersInner object itself. + */ + public NotificationHubCreateOrUpdateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubPatchParametersInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubPatchParametersInner.java new file mode 100644 index 00000000000..b06d845e41b --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubPatchParametersInner.java @@ -0,0 +1,291 @@ +/** + * 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.notificationhubs.implementation; + +import java.util.List; +import com.microsoft.azure.management.notificationhubs.SharedAccessAuthorizationRuleProperties; +import com.microsoft.azure.management.notificationhubs.ApnsCredential; +import com.microsoft.azure.management.notificationhubs.WnsCredential; +import com.microsoft.azure.management.notificationhubs.GcmCredential; +import com.microsoft.azure.management.notificationhubs.MpnsCredential; +import com.microsoft.azure.management.notificationhubs.AdmCredential; +import com.microsoft.azure.management.notificationhubs.BaiduCredential; +import com.microsoft.azure.management.notificationhubs.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Parameters supplied to the patch NotificationHub operation. + */ +@JsonFlatten +@SkipParentValidation +public class NotificationHubPatchParametersInner extends Resource { + /** + * The NotificationHub name. + */ + @JsonProperty(value = "properties.name") + private String notificationHubPatchParametersName; + + /** + * The RegistrationTtl of the created NotificationHub. + */ + @JsonProperty(value = "properties.registrationTtl") + private String registrationTtl; + + /** + * The AuthorizationRules of the created NotificationHub. + */ + @JsonProperty(value = "properties.authorizationRules") + private List authorizationRules; + + /** + * The ApnsCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.apnsCredential") + private ApnsCredential apnsCredential; + + /** + * The WnsCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.wnsCredential") + private WnsCredential wnsCredential; + + /** + * The GcmCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.gcmCredential") + private GcmCredential gcmCredential; + + /** + * The MpnsCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.mpnsCredential") + private MpnsCredential mpnsCredential; + + /** + * The AdmCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.admCredential") + private AdmCredential admCredential; + + /** + * The BaiduCredential of the created NotificationHub. + */ + @JsonProperty(value = "properties.baiduCredential") + private BaiduCredential baiduCredential; + + /** + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the NotificationHub name. + * + * @return the notificationHubPatchParametersName value + */ + public String notificationHubPatchParametersName() { + return this.notificationHubPatchParametersName; + } + + /** + * Set the NotificationHub name. + * + * @param notificationHubPatchParametersName the notificationHubPatchParametersName value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withNotificationHubPatchParametersName(String notificationHubPatchParametersName) { + this.notificationHubPatchParametersName = notificationHubPatchParametersName; + return this; + } + + /** + * Get the RegistrationTtl of the created NotificationHub. + * + * @return the registrationTtl value + */ + public String registrationTtl() { + return this.registrationTtl; + } + + /** + * Set the RegistrationTtl of the created NotificationHub. + * + * @param registrationTtl the registrationTtl value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withRegistrationTtl(String registrationTtl) { + this.registrationTtl = registrationTtl; + return this; + } + + /** + * Get the AuthorizationRules of the created NotificationHub. + * + * @return the authorizationRules value + */ + public List authorizationRules() { + return this.authorizationRules; + } + + /** + * Set the AuthorizationRules of the created NotificationHub. + * + * @param authorizationRules the authorizationRules value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withAuthorizationRules(List authorizationRules) { + this.authorizationRules = authorizationRules; + return this; + } + + /** + * Get the ApnsCredential of the created NotificationHub. + * + * @return the apnsCredential value + */ + public ApnsCredential apnsCredential() { + return this.apnsCredential; + } + + /** + * Set the ApnsCredential of the created NotificationHub. + * + * @param apnsCredential the apnsCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withApnsCredential(ApnsCredential apnsCredential) { + this.apnsCredential = apnsCredential; + return this; + } + + /** + * Get the WnsCredential of the created NotificationHub. + * + * @return the wnsCredential value + */ + public WnsCredential wnsCredential() { + return this.wnsCredential; + } + + /** + * Set the WnsCredential of the created NotificationHub. + * + * @param wnsCredential the wnsCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withWnsCredential(WnsCredential wnsCredential) { + this.wnsCredential = wnsCredential; + return this; + } + + /** + * Get the GcmCredential of the created NotificationHub. + * + * @return the gcmCredential value + */ + public GcmCredential gcmCredential() { + return this.gcmCredential; + } + + /** + * Set the GcmCredential of the created NotificationHub. + * + * @param gcmCredential the gcmCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withGcmCredential(GcmCredential gcmCredential) { + this.gcmCredential = gcmCredential; + return this; + } + + /** + * Get the MpnsCredential of the created NotificationHub. + * + * @return the mpnsCredential value + */ + public MpnsCredential mpnsCredential() { + return this.mpnsCredential; + } + + /** + * Set the MpnsCredential of the created NotificationHub. + * + * @param mpnsCredential the mpnsCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withMpnsCredential(MpnsCredential mpnsCredential) { + this.mpnsCredential = mpnsCredential; + return this; + } + + /** + * Get the AdmCredential of the created NotificationHub. + * + * @return the admCredential value + */ + public AdmCredential admCredential() { + return this.admCredential; + } + + /** + * Set the AdmCredential of the created NotificationHub. + * + * @param admCredential the admCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withAdmCredential(AdmCredential admCredential) { + this.admCredential = admCredential; + return this; + } + + /** + * Get the BaiduCredential of the created NotificationHub. + * + * @return the baiduCredential value + */ + public BaiduCredential baiduCredential() { + return this.baiduCredential; + } + + /** + * Set the BaiduCredential of the created NotificationHub. + * + * @param baiduCredential the baiduCredential value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withBaiduCredential(BaiduCredential baiduCredential) { + this.baiduCredential = baiduCredential; + return this; + } + + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the NotificationHubPatchParametersInner object itself. + */ + public NotificationHubPatchParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java index df54e643d9b..cea9529cc6e 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubResourceInner.java @@ -16,14 +16,17 @@ import com.microsoft.azure.management.notificationhubs.MpnsCredential; import com.microsoft.azure.management.notificationhubs.AdmCredential; import com.microsoft.azure.management.notificationhubs.BaiduCredential; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Description of a NotificationHub Resource. */ @JsonFlatten +@SkipParentValidation public class NotificationHubResourceInner extends Resource { /** * The NotificationHub name. @@ -80,7 +83,13 @@ public class NotificationHubResourceInner extends Resource { private BaiduCredential baiduCredential; /** - * Get the notificationHubResourceName value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the NotificationHub name. * * @return the notificationHubResourceName value */ @@ -89,7 +98,7 @@ public String notificationHubResourceName() { } /** - * Set the notificationHubResourceName value. + * Set the NotificationHub name. * * @param notificationHubResourceName the notificationHubResourceName value to set * @return the NotificationHubResourceInner object itself. @@ -100,7 +109,7 @@ public NotificationHubResourceInner withNotificationHubResourceName(String notif } /** - * Get the registrationTtl value. + * Get the RegistrationTtl of the created NotificationHub. * * @return the registrationTtl value */ @@ -109,7 +118,7 @@ public String registrationTtl() { } /** - * Set the registrationTtl value. + * Set the RegistrationTtl of the created NotificationHub. * * @param registrationTtl the registrationTtl value to set * @return the NotificationHubResourceInner object itself. @@ -120,7 +129,7 @@ public NotificationHubResourceInner withRegistrationTtl(String registrationTtl) } /** - * Get the authorizationRules value. + * Get the AuthorizationRules of the created NotificationHub. * * @return the authorizationRules value */ @@ -129,7 +138,7 @@ public List authorizationRules() { } /** - * Set the authorizationRules value. + * Set the AuthorizationRules of the created NotificationHub. * * @param authorizationRules the authorizationRules value to set * @return the NotificationHubResourceInner object itself. @@ -140,7 +149,7 @@ public NotificationHubResourceInner withAuthorizationRules(List> checkAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkNotificationHubAvailability(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body CheckAvailabilityParameters 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.notificationhubs.NotificationHubs createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}") Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Body NotificationHubCreateOrUpdateParametersInner 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.notificationhubs.NotificationHubs patch" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}") + Observable> patch(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Body NotificationHubPatchParametersInner 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.notificationhubs.NotificationHubs delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}", method = "DELETE", hasBody = true) Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -79,9 +87,13 @@ interface NotificationHubsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}") Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @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.notificationhubs.NotificationHubs debugSend" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/debugsend") + Observable> debugSend(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("subscriptionId") String subscriptionId, @Body Object 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.notificationhubs.NotificationHubs createOrUpdateAuthorizationRule" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}") - Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("notificationHubName") String notificationHubName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.NotificationHubs deleteAuthorizationRule" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) @@ -132,8 +144,8 @@ interface NotificationHubsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the CheckAvailabilityResultInner object if successful. */ - public CheckAvailabilityResultInner checkAvailability(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); + public CheckAvailabilityResultInner checkNotificationHubAvailability(String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters) { + return checkNotificationHubAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body(); } /** @@ -146,8 +158,8 @@ public CheckAvailabilityResultInner checkAvailability(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); + public ServiceFuture checkNotificationHubAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNotificationHubAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); } /** @@ -159,8 +171,8 @@ public ServiceFuture checkAvailabilityAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the CheckAvailabilityResultInner object */ - public Observable checkAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { - return checkAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, CheckAvailabilityResultInner>() { + public Observable checkNotificationHubAvailabilityAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters) { + return checkNotificationHubAvailabilityWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, CheckAvailabilityResultInner>() { @Override public CheckAvailabilityResultInner call(ServiceResponse response) { return response.body(); @@ -177,7 +189,7 @@ public CheckAvailabilityResultInner call(ServiceResponse> checkAvailabilityWithServiceResponseAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParametersInner parameters) { + public Observable> checkNotificationHubAvailabilityWithServiceResponseAsync(String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -194,12 +206,12 @@ public Observable> checkAvailabili throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); - return service.checkAvailability(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.checkNotificationHubAvailability(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkAvailabilityDelegate(response); + ServiceResponse clientResponse = checkNotificationHubAvailabilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -208,7 +220,7 @@ public Observable> call(Response checkAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse checkNotificationHubAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -317,6 +329,191 @@ private ServiceResponse createOrUpdateDelegate(Res .build(response); } + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotificationHubResourceInner object if successful. + */ + public NotificationHubResourceInner patch(String resourceGroupName, String namespaceName, String notificationHubName) { + return patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body(); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param 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 patchAsync(String resourceGroupName, String namespaceName, String notificationHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName), serviceCallback); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotificationHubResourceInner object + */ + public Observable patchAsync(String resourceGroupName, String namespaceName, String notificationHubName) { + return patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1, NotificationHubResourceInner>() { + @Override + public NotificationHubResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotificationHubResourceInner object + */ + public Observable> patchWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (notificationHubName == null) { + throw new IllegalArgumentException("Parameter notificationHubName 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final NotificationHubPatchParametersInner parameters = null; + return service.patch(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = patchDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Parameters supplied to patch a NotificationHub Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotificationHubResourceInner object if successful. + */ + public NotificationHubResourceInner patch(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubPatchParametersInner parameters) { + return patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).toBlocking().single().body(); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Parameters supplied to patch a NotificationHub Resource. + * @param 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 patchAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubPatchParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters), serviceCallback); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Parameters supplied to patch a NotificationHub Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotificationHubResourceInner object + */ + public Observable patchAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubPatchParametersInner parameters) { + return patchWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).map(new Func1, NotificationHubResourceInner>() { + @Override + public NotificationHubResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Patch a NotificationHub in a namespace. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Parameters supplied to patch a NotificationHub Resource. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotificationHubResourceInner object + */ + public Observable> patchWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubPatchParametersInner parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (notificationHubName == null) { + throw new IllegalArgumentException("Parameter notificationHubName 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + Validator.validate(parameters); + return service.patch(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = patchDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse patchDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Deletes a notification hub associated with a namespace. * @@ -502,6 +699,190 @@ private ServiceResponse getDelegate(Response debugSendAsync(String resourceGroupName, String namespaceName, String notificationHubName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(debugSendWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName), serviceCallback); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DebugSendResponseInner object + */ + public Observable debugSendAsync(String resourceGroupName, String namespaceName, String notificationHubName) { + return debugSendWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).map(new Func1, DebugSendResponseInner>() { + @Override + public DebugSendResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DebugSendResponseInner object + */ + public Observable> debugSendWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (notificationHubName == null) { + throw new IllegalArgumentException("Parameter notificationHubName 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Object parameters = null; + return service.debugSend(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = debugSendDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Debug send parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DebugSendResponseInner object if successful. + */ + public DebugSendResponseInner debugSend(String resourceGroupName, String namespaceName, String notificationHubName, Object parameters) { + return debugSendWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).toBlocking().single().body(); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Debug send parameters + * @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 debugSendAsync(String resourceGroupName, String namespaceName, String notificationHubName, Object parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(debugSendWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters), serviceCallback); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Debug send parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DebugSendResponseInner object + */ + public Observable debugSendAsync(String resourceGroupName, String namespaceName, String notificationHubName, Object parameters) { + return debugSendWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).map(new Func1, DebugSendResponseInner>() { + @Override + public DebugSendResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * test send a push notification. + * + * @param resourceGroupName The name of the resource group. + * @param namespaceName The namespace name. + * @param notificationHubName The notification hub name. + * @param parameters Debug send parameters + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DebugSendResponseInner object + */ + public Observable> debugSendWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, Object parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (namespaceName == null) { + throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); + } + if (notificationHubName == null) { + throw new IllegalArgumentException("Parameter notificationHubName 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 (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.debugSend(resourceGroupName, namespaceName, notificationHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = debugSendDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse debugSendDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Creates/Updates an authorization rule for a NotificationHub. * @@ -509,14 +890,14 @@ private ServiceResponse getDelegate(Response createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters), serviceCallback); + public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, properties), serviceCallback); } /** @@ -542,12 +923,12 @@ public ServiceFuture createOrUpdateA * @param namespaceName The namespace name. * @param notificationHubName The notification hub name. * @param authorizationRuleName Authorization Rule Name. - * @param parameters The shared access authorization rule. + * @param properties Properties of the Namespace AuthorizationRules. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SharedAccessAuthorizationRuleResourceInner object */ - public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { - return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { + public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties) { + return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, properties).map(new Func1, SharedAccessAuthorizationRuleResourceInner>() { @Override public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse response) { return response.body(); @@ -562,11 +943,11 @@ public SharedAccessAuthorizationRuleResourceInner call(ServiceResponse> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParametersInner parameters) { + public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName, SharedAccessAuthorizationRuleProperties properties) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -582,14 +963,16 @@ public Observable> c if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters 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.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + if (properties == null) { + throw new IllegalArgumentException("Parameter properties is required and cannot be null."); + } + Validator.validate(properties); + SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters = new SharedAccessAuthorizationRuleCreateOrUpdateParameters(); + parameters.withProperties(properties); + return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -704,8 +1087,8 @@ public Observable> call(Response response) { private ServiceResponse deleteAuthorizationRuleDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java index 17adfd9985b..f55de1e92e5 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/NotificationHubsManagementClientImpl.java @@ -133,29 +133,29 @@ public NotificationHubsManagementClientImpl withGenerateClientRequestId(boolean } /** - * The NamespacesInner object to access its operations. + * The OperationsInner object to access its operations. */ - private NamespacesInner namespaces; + private OperationsInner operations; /** - * Gets the NamespacesInner object to access its operations. - * @return the NamespacesInner object. + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. */ - public NamespacesInner namespaces() { - return this.namespaces; + public OperationsInner operations() { + return this.operations; } /** - * The NamesInner object to access its operations. + * The NamespacesInner object to access its operations. */ - private NamesInner names; + private NamespacesInner namespaces; /** - * Gets the NamesInner object to access its operations. - * @return the NamesInner object. + * Gets the NamespacesInner object to access its operations. + * @return the NamespacesInner object. */ - public NamesInner names() { - return this.names; + public NamespacesInner namespaces() { + return this.namespaces; } /** @@ -171,19 +171,6 @@ public NotificationHubsInner notificationHubs() { return this.notificationHubs; } - /** - * The HubsInner object to access its operations. - */ - private HubsInner hubs; - - /** - * Gets the HubsInner object to access its operations. - * @return the HubsInner object. - */ - public HubsInner hubs() { - return this.hubs; - } - /** * Initializes an instance of NotificationHubsManagementClient client. * @@ -219,10 +206,9 @@ protected void initialize() { this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; + this.operations = new OperationsInner(restClient().retrofit(), this); this.namespaces = new NamespacesInner(restClient().retrofit(), this); - this.names = new NamesInner(restClient().retrofit(), this); this.notificationHubs = new NotificationHubsInner(restClient().retrofit(), this); - this.hubs = new HubsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationInner.java new file mode 100644 index 00000000000..2ba61731046 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationInner.java @@ -0,0 +1,59 @@ +/** + * 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.notificationhubs.implementation; + +import com.microsoft.azure.management.notificationhubs.OperationDisplay; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A NotificationHubs REST API operation. + */ +public class OperationInner { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * The object that represents the operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /** + * Get operation name: {provider}/{resource}/{operation}. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get the object that represents the operation. + * + * @return the display value + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the object that represents the operation. + * + * @param display the display value to set + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationsInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationsInner.java new file mode 100644 index 00000000000..6c111777afd --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/OperationsInner.java @@ -0,0 +1,283 @@ +/** + * 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.notificationhubs.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.notificationhubs.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.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 Operations. + */ +public class OperationsInner { + /** The Retrofit service to perform REST calls. */ + private OperationsService service; + /** The service client containing this operation class. */ + private NotificationHubsManagementClientImpl client; + + /** + * Initializes an instance of OperationsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public OperationsInner(Retrofit retrofit, NotificationHubsManagementClientImpl client) { + this.service = retrofit.create(OperationsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Operations to be + * used by Retrofit to perform actually REST calls. + */ + interface OperationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.notificationhubs.Operations list" }) + @GET("providers/Microsoft.NotificationHubs/operations") + Observable> list(@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.notificationhubs.Operations listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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<OperationInner> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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 ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<OperationInner> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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)); + } + }); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(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); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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<OperationInner> 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(); + } + }; + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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<OperationInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + * @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<OperationInner> 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)); + } + }); + } + + /** + * Lists all of the available NotificationHubs REST API operations. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<OperationInner> 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/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java index fd31c979816..ce03d7cd70e 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/PnsCredentialsResourceInner.java @@ -14,14 +14,17 @@ import com.microsoft.azure.management.notificationhubs.MpnsCredential; import com.microsoft.azure.management.notificationhubs.AdmCredential; import com.microsoft.azure.management.notificationhubs.BaiduCredential; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Description of a NotificationHub PNS Credentials. */ @JsonFlatten +@SkipParentValidation public class PnsCredentialsResourceInner extends Resource { /** * The ApnsCredential of the created NotificationHub. @@ -60,7 +63,13 @@ public class PnsCredentialsResourceInner extends Resource { private BaiduCredential baiduCredential; /** - * Get the apnsCredential value. + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the ApnsCredential of the created NotificationHub. * * @return the apnsCredential value */ @@ -69,7 +78,7 @@ public ApnsCredential apnsCredential() { } /** - * Set the apnsCredential value. + * Set the ApnsCredential of the created NotificationHub. * * @param apnsCredential the apnsCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -80,7 +89,7 @@ public PnsCredentialsResourceInner withApnsCredential(ApnsCredential apnsCredent } /** - * Get the wnsCredential value. + * Get the WnsCredential of the created NotificationHub. * * @return the wnsCredential value */ @@ -89,7 +98,7 @@ public WnsCredential wnsCredential() { } /** - * Set the wnsCredential value. + * Set the WnsCredential of the created NotificationHub. * * @param wnsCredential the wnsCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -100,7 +109,7 @@ public PnsCredentialsResourceInner withWnsCredential(WnsCredential wnsCredential } /** - * Get the gcmCredential value. + * Get the GcmCredential of the created NotificationHub. * * @return the gcmCredential value */ @@ -109,7 +118,7 @@ public GcmCredential gcmCredential() { } /** - * Set the gcmCredential value. + * Set the GcmCredential of the created NotificationHub. * * @param gcmCredential the gcmCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -120,7 +129,7 @@ public PnsCredentialsResourceInner withGcmCredential(GcmCredential gcmCredential } /** - * Get the mpnsCredential value. + * Get the MpnsCredential of the created NotificationHub. * * @return the mpnsCredential value */ @@ -129,7 +138,7 @@ public MpnsCredential mpnsCredential() { } /** - * Set the mpnsCredential value. + * Set the MpnsCredential of the created NotificationHub. * * @param mpnsCredential the mpnsCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -140,7 +149,7 @@ public PnsCredentialsResourceInner withMpnsCredential(MpnsCredential mpnsCredent } /** - * Get the admCredential value. + * Get the AdmCredential of the created NotificationHub. * * @return the admCredential value */ @@ -149,7 +158,7 @@ public AdmCredential admCredential() { } /** - * Set the admCredential value. + * Set the AdmCredential of the created NotificationHub. * * @param admCredential the admCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -160,7 +169,7 @@ public PnsCredentialsResourceInner withAdmCredential(AdmCredential admCredential } /** - * Get the baiduCredential value. + * Get the BaiduCredential of the created NotificationHub. * * @return the baiduCredential value */ @@ -169,7 +178,7 @@ public BaiduCredential baiduCredential() { } /** - * Set the baiduCredential value. + * Set the BaiduCredential of the created NotificationHub. * * @param baiduCredential the baiduCredential value to set * @return the PnsCredentialsResourceInner object itself. @@ -179,4 +188,24 @@ public PnsCredentialsResourceInner withBaiduCredential(BaiduCredential baiduCred return this; } + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the PnsCredentialsResourceInner object itself. + */ + public PnsCredentialsResourceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + } diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java index 040868fbcd7..34b95ee6bde 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/ResourceListKeysInner.java @@ -45,7 +45,7 @@ public class ResourceListKeysInner { private String keyName; /** - * Get the primaryConnectionString value. + * Get primaryConnectionString of the AuthorizationRule. * * @return the primaryConnectionString value */ @@ -54,7 +54,7 @@ public String primaryConnectionString() { } /** - * Set the primaryConnectionString value. + * Set primaryConnectionString of the AuthorizationRule. * * @param primaryConnectionString the primaryConnectionString value to set * @return the ResourceListKeysInner object itself. @@ -65,7 +65,7 @@ public ResourceListKeysInner withPrimaryConnectionString(String primaryConnectio } /** - * Get the secondaryConnectionString value. + * Get secondaryConnectionString of the created AuthorizationRule. * * @return the secondaryConnectionString value */ @@ -74,7 +74,7 @@ public String secondaryConnectionString() { } /** - * Set the secondaryConnectionString value. + * Set secondaryConnectionString of the created AuthorizationRule. * * @param secondaryConnectionString the secondaryConnectionString value to set * @return the ResourceListKeysInner object itself. @@ -85,7 +85,7 @@ public ResourceListKeysInner withSecondaryConnectionString(String secondaryConne } /** - * Get the primaryKey value. + * Get primaryKey of the created AuthorizationRule. * * @return the primaryKey value */ @@ -94,7 +94,7 @@ public String primaryKey() { } /** - * Set the primaryKey value. + * Set primaryKey of the created AuthorizationRule. * * @param primaryKey the primaryKey value to set * @return the ResourceListKeysInner object itself. @@ -105,7 +105,7 @@ public ResourceListKeysInner withPrimaryKey(String primaryKey) { } /** - * Get the secondaryKey value. + * Get secondaryKey of the created AuthorizationRule. * * @return the secondaryKey value */ @@ -114,7 +114,7 @@ public String secondaryKey() { } /** - * Set the secondaryKey value. + * Set secondaryKey of the created AuthorizationRule. * * @param secondaryKey the secondaryKey value to set * @return the ResourceListKeysInner object itself. @@ -125,7 +125,7 @@ public ResourceListKeysInner withSecondaryKey(String secondaryKey) { } /** - * Get the keyName value. + * Get keyName of the created AuthorizationRule. * * @return the keyName value */ @@ -134,7 +134,7 @@ public String keyName() { } /** - * Set the keyName value. + * Set keyName of the created AuthorizationRule. * * @param keyName the keyName value to set * @return the ResourceListKeysInner object itself. diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleListResultInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleListResultInner.java new file mode 100644 index 00000000000..94c6ba4d958 --- /dev/null +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleListResultInner.java @@ -0,0 +1,71 @@ +/** + * 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.notificationhubs.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response of the List Namespace operation. + */ +public class SharedAccessAuthorizationRuleListResultInner { + /** + * Result of the List AuthorizationRules operation. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Link to the next set of results. Not empty if Value contains incomplete + * list of AuthorizationRules. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get result of the List AuthorizationRules operation. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set result of the List AuthorizationRules operation. + * + * @param value the value value to set + * @return the SharedAccessAuthorizationRuleListResultInner object itself. + */ + public SharedAccessAuthorizationRuleListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get link to the next set of results. Not empty if Value contains incomplete list of AuthorizationRules. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set link to the next set of results. Not empty if Value contains incomplete list of AuthorizationRules. + * + * @param nextLink the nextLink value to set + * @return the SharedAccessAuthorizationRuleListResultInner object itself. + */ + public SharedAccessAuthorizationRuleListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java index a8c1b76cd9c..748f987b0f7 100644 --- a/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java +++ b/azure-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/implementation/SharedAccessAuthorizationRuleResourceInner.java @@ -10,14 +10,17 @@ import java.util.List; import com.microsoft.azure.management.notificationhubs.AccessRights; +import com.microsoft.azure.management.notificationhubs.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.rest.SkipParentValidation; import com.microsoft.azure.Resource; /** * Description of a Namespace AuthorizationRules. */ @JsonFlatten +@SkipParentValidation public class SharedAccessAuthorizationRuleResourceInner extends Resource { /** * The rights associated with the rule. @@ -26,7 +29,63 @@ public class SharedAccessAuthorizationRuleResourceInner extends Resource { private List rights; /** - * Get the rights value. + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "properties.primaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String primaryKey; + + /** + * A base64-encoded 256-bit primary key for signing and validating the SAS + * token. + */ + @JsonProperty(value = "properties.secondaryKey", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryKey; + + /** + * A string that describes the authorization rule. + */ + @JsonProperty(value = "properties.keyName", access = JsonProperty.Access.WRITE_ONLY) + private String keyName; + + /** + * A string that describes the claim type. + */ + @JsonProperty(value = "properties.claimType", access = JsonProperty.Access.WRITE_ONLY) + private String claimType; + + /** + * A string that describes the claim value. + */ + @JsonProperty(value = "properties.claimValue", access = JsonProperty.Access.WRITE_ONLY) + private String claimValue; + + /** + * The last modified time for this rule. + */ + @JsonProperty(value = "properties.modifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private String modifiedTime; + + /** + * The created time for this rule. + */ + @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) + private String createdTime; + + /** + * The revision number for the rule. + */ + @JsonProperty(value = "properties.revision", access = JsonProperty.Access.WRITE_ONLY) + private Integer revision; + + /** + * The sku of the created namespace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /** + * Get the rights associated with the rule. * * @return the rights value */ @@ -35,7 +94,7 @@ public List rights() { } /** - * Set the rights value. + * Set the rights associated with the rule. * * @param rights the rights value to set * @return the SharedAccessAuthorizationRuleResourceInner object itself. @@ -45,4 +104,96 @@ public SharedAccessAuthorizationRuleResourceInner withRights(List return this; } + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the primaryKey value + */ + public String primaryKey() { + return this.primaryKey; + } + + /** + * Get a base64-encoded 256-bit primary key for signing and validating the SAS token. + * + * @return the secondaryKey value + */ + public String secondaryKey() { + return this.secondaryKey; + } + + /** + * Get a string that describes the authorization rule. + * + * @return the keyName value + */ + public String keyName() { + return this.keyName; + } + + /** + * Get a string that describes the claim type. + * + * @return the claimType value + */ + public String claimType() { + return this.claimType; + } + + /** + * Get a string that describes the claim value. + * + * @return the claimValue value + */ + public String claimValue() { + return this.claimValue; + } + + /** + * Get the last modified time for this rule. + * + * @return the modifiedTime value + */ + public String modifiedTime() { + return this.modifiedTime; + } + + /** + * Get the created time for this rule. + * + * @return the createdTime value + */ + public String createdTime() { + return this.createdTime; + } + + /** + * Get the revision number for the rule. + * + * @return the revision value + */ + public Integer revision() { + return this.revision; + } + + /** + * Get the sku of the created namespace. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku of the created namespace. + * + * @param sku the sku value to set + * @return the SharedAccessAuthorizationRuleResourceInner object itself. + */ + public SharedAccessAuthorizationRuleResourceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + }