Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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", required = true)
private String location;

/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> 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 the id value.
*
* @return the id value
*/
public String id() {
return this.id;
}

/**
* Get the name value.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set the name value.
*
* @param name the name value to set
* @return the CheckAvailabilityParameters object itself.
*/
public CheckAvailabilityParameters withName(String name) {
this.name = name;
return this;
}

/**
* Get the type value.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Get the location value.
*
* @return the location value
*/
public String location() {
return this.location;
}

/**
* Set the location value.
*
* @param location the location value to set
* @return the CheckAvailabilityParameters object itself.
*/
public CheckAvailabilityParameters withLocation(String location) {
this.location = location;
return this;
}

/**
* Get the tags value.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags value.
*
* @param tags the tags value to set
* @return the CheckAvailabilityParameters object itself.
*/
public CheckAvailabilityParameters withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the sku value.
*
* @return the sku value
*/
public Sku sku() {
return this.sku;
}

/**
* Set the sku value.
*
* @param sku the sku value to set
* @return the CheckAvailabilityParameters object itself.
*/
public CheckAvailabilityParameters withSku(Sku sku) {
this.sku = sku;
return this;
}

/**
* Get the isAvailiable value.
*
* @return the isAvailiable value
*/
public Boolean isAvailiable() {
return this.isAvailiable;
}

/**
* Set the isAvailiable value.
*
* @param isAvailiable the isAvailiable value to set
* @return the CheckAvailabilityParameters object itself.
*/
public CheckAvailabilityParameters withIsAvailiable(Boolean isAvailiable) {
this.isAvailiable = isAvailiable;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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 the code value.
*
* @return the code value
*/
public String code() {
return this.code;
}

/**
* Set the code value.
*
* @param code the code value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withCode(String code) {
this.code = code;
return this;
}

/**
* Get the message value.
*
* @return the message value
*/
public String message() {
return this.message;
}

/**
* Set the message value.
*
* @param message the message value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withMessage(String message) {
this.message = message;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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<ResponseBody> 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<ResponseBody> response, final ErrorResponse body) {
super(message, response, body);
}

@Override
public ErrorResponse body() {
return (ErrorResponse) super.body();
}
}
Original file line number Diff line number Diff line change
@@ -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<String, String> tags;

/**
* The sku of the created namespace.
*/
@JsonProperty(value = "sku")
private Sku sku;

/**
* Get the tags value.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags value.
*
* @param tags the tags value to set
* @return the NamespacePatchParameters object itself.
*/
public NamespacePatchParameters withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the sku value.
*
* @return the sku value
*/
public Sku sku() {
return this.sku;
}

/**
* Set the sku value.
*
* @param sku the sku value to set
* @return the NamespacePatchParameters object itself.
*/
public NamespacePatchParameters withSku(Sku sku) {
this.sku = sku;
return this;
}

}
Loading