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,53 @@
/**
* 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.iotcentral;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for AppNameUnavailabilityReason.
*/
public enum AppNameUnavailabilityReason {
/** Enum value Invalid. */
INVALID("Invalid"),

/** Enum value AlreadyExists. */
ALREADY_EXISTS("AlreadyExists");

/** The actual serialized value for a AppNameUnavailabilityReason instance. */
private String value;

AppNameUnavailabilityReason(String value) {
this.value = value;
}

/**
* Parses a serialized value to a AppNameUnavailabilityReason instance.
*
* @param value the serialized value to parse.
* @return the parsed AppNameUnavailabilityReason object, or null if unable to parse.
*/
@JsonCreator
public static AppNameUnavailabilityReason fromString(String value) {
AppNameUnavailabilityReason[] items = AppNameUnavailabilityReason.values();
for (AppNameUnavailabilityReason item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/**
* 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.iotcentral;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* The description of the IoT Central application.
*/
@JsonFlatten
public class AppPatch {
/**
* Instance tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* The ID of the application.
*/
@JsonProperty(value = "properties.applicationId", access = JsonProperty.Access.WRITE_ONLY)
private String applicationId;

/**
* The display name of the application.
*/
@JsonProperty(value = "properties.displayName")
private String displayName;

/**
* The subdomain of the application.
*/
@JsonProperty(value = "properties.subdomain")
private String subdomain;

/**
* The ID of the application template, which is a blueprint that defines
* the characteristics and behaviors of an application. Optional; if not
* specified, defaults to a blank blueprint and allows the application to
* be defined from scratch.
*/
@JsonProperty(value = "properties.template")
private String template;

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

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

/**
* Get the ID of the application.
*
* @return the applicationId value
*/
public String applicationId() {
return this.applicationId;
}

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

/**
* Set the display name of the application.
*
* @param displayName the displayName value to set
* @return the AppPatch object itself.
*/
public AppPatch withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}

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

/**
* Set the subdomain of the application.
*
* @param subdomain the subdomain value to set
* @return the AppPatch object itself.
*/
public AppPatch withSubdomain(String subdomain) {
this.subdomain = subdomain;
return this;
}

/**
* Get the ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.
*
* @return the template value
*/
public String template() {
return this.template;
}

/**
* Set the ID of the application template, which is a blueprint that defines the characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch.
*
* @param template the template value to set
* @return the AppPatch object itself.
*/
public AppPatch withTemplate(String template) {
this.template = template;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.iotcentral;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for AppSku.
*/
public final class AppSku extends ExpandableStringEnum<AppSku> {
/** Static value F1 for AppSku. */
public static final AppSku F1 = fromString("F1");

/** Static value S1 for AppSku. */
public static final AppSku S1 = fromString("S1");

/**
* Creates or finds a AppSku from its string representation.
* @param name a name to look for
* @return the corresponding AppSku
*/
@JsonCreator
public static AppSku fromString(String name) {
return fromString(name, AppSku.class);
}

/**
* @return known AppSku values
*/
public static Collection<AppSku> values() {
return values(AppSku.class);
}
}
Original file line number Diff line number Diff line change
@@ -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.iotcentral;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Information about the SKU of the IoT Central application.
*/
public class AppSkuInfo {
/**
* The name of the SKU. Possible values include: 'F1', 'S1'.
*/
@JsonProperty(value = "name", required = true)
private AppSku name;

/**
* Get the name of the SKU. Possible values include: 'F1', 'S1'.
*
* @return the name value
*/
public AppSku name() {
return this.name;
}

/**
* Set the name of the SKU. Possible values include: 'F1', 'S1'.
*
* @param name the name value to set
* @return the AppSkuInfo object itself.
*/
public AppSkuInfo withName(AppSku name) {
this.name = name;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.iotcentral;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Error details.
*/
public class ErrorDetails {
/**
* The error code.
*/
@JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
private String code;

/**
* The error message.
*/
@JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
private String message;

/**
* The target of the particular error.
*/
@JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
private String target;

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

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

/**
* Get the target of the particular error.
*
* @return the target value
*/
public String target() {
return this.target;
}

}
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.iotcentral;

import com.microsoft.rest.RestException;
import okhttp3.ResponseBody;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with ErrorDetails information.
*/
public class ErrorDetailsException extends RestException {
/**
* Initializes a new instance of the ErrorDetailsException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
*/
public ErrorDetailsException(final String message, final Response<ResponseBody> response) {
super(message, response);
}

/**
* Initializes a new instance of the ErrorDetailsException 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 ErrorDetailsException(final String message, final Response<ResponseBody> response, final ErrorDetails body) {
super(message, response, body);
}

@Override
public ErrorDetails body() {
return (ErrorDetails) super.body();
}
}
Loading