forked from Azure/azure-libraries-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 26a961a6290da466d399951b37673e0998ceda94 (#72)
Change C# SDK namespace Keeping in line with the standardization efforts, changing the namespace of C# SDK to the prescribed format Microsoft.Azure.CognitiveServices.<Category>.<API name>
- Loading branch information
1 parent
e9b6d3f
commit f7df91c
Showing
17 changed files
with
1,222 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...spellcheck/src/main/java/com/microsoft/azure/cognitiveservices/spellcheck/ActionType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.cognitiveservices.spellcheck; | ||
|
||
import java.util.Collection; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.microsoft.rest.ExpandableStringEnum; | ||
|
||
/** | ||
* Defines values for ActionType. | ||
*/ | ||
public final class ActionType extends ExpandableStringEnum<ActionType> { | ||
/** Static value Edit for ActionType. */ | ||
public static final ActionType EDIT = fromString("Edit"); | ||
|
||
/** Static value Load for ActionType. */ | ||
public static final ActionType LOAD = fromString("Load"); | ||
|
||
/** | ||
* Creates or finds a ActionType from its string representation. | ||
* @param name a name to look for | ||
* @return the corresponding ActionType | ||
*/ | ||
@JsonCreator | ||
public static ActionType fromString(String name) { | ||
return fromString(name, ActionType.class); | ||
} | ||
|
||
/** | ||
* @return known ActionType values | ||
*/ | ||
public static Collection<ActionType> values() { | ||
return values(ActionType.class); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...ces/spellcheck/src/main/java/com/microsoft/azure/cognitiveservices/spellcheck/Answer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* 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.cognitiveservices.spellcheck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
|
||
/** | ||
* The Answer model. | ||
*/ | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type") | ||
@JsonTypeName("Answer") | ||
@JsonSubTypes({ | ||
@JsonSubTypes.Type(name = "SpellCheck", value = SpellCheckInner.class) | ||
}) | ||
public class Answer extends Response { | ||
} |
135 changes: 135 additions & 0 deletions
135
...ices/spellcheck/src/main/java/com/microsoft/azure/cognitiveservices/spellcheck/Error.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/** | ||
* 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.cognitiveservices.spellcheck; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Defines the error that occurred. | ||
*/ | ||
public class Error { | ||
/** | ||
* The error code that identifies the category of error. Possible values | ||
* include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', | ||
* 'InvalidAuthorization', 'InsufficientAuthorization'. | ||
*/ | ||
@JsonProperty(value = "code", required = true) | ||
private ErrorCode code; | ||
|
||
/** | ||
* The error code that further helps to identify the error. Possible values | ||
* include: 'UnexpectedError', 'ResourceError', 'NotImplemented', | ||
* 'ParameterMissing', 'ParameterInvalidValue', 'HttpNotAllowed', | ||
* 'Blocked', 'AuthorizationMissing', 'AuthorizationRedundancy', | ||
* 'AuthorizationDisabled', 'AuthorizationExpired'. | ||
*/ | ||
@JsonProperty(value = "subCode", access = JsonProperty.Access.WRITE_ONLY) | ||
private ErrorSubCode subCode; | ||
|
||
/** | ||
* A description of the error. | ||
*/ | ||
@JsonProperty(value = "message", required = true) | ||
private String message; | ||
|
||
/** | ||
* A description that provides additional information about the error. | ||
*/ | ||
@JsonProperty(value = "moreDetails", access = JsonProperty.Access.WRITE_ONLY) | ||
private String moreDetails; | ||
|
||
/** | ||
* The parameter in the request that caused the error. | ||
*/ | ||
@JsonProperty(value = "parameter", access = JsonProperty.Access.WRITE_ONLY) | ||
private String parameter; | ||
|
||
/** | ||
* The parameter's value in the request that was not valid. | ||
*/ | ||
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) | ||
private String value; | ||
|
||
/** | ||
* Get the code value. | ||
* | ||
* @return the code value | ||
*/ | ||
public ErrorCode code() { | ||
return this.code; | ||
} | ||
|
||
/** | ||
* Set the code value. | ||
* | ||
* @param code the code value to set | ||
* @return the Error object itself. | ||
*/ | ||
public Error withCode(ErrorCode code) { | ||
this.code = code; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get the subCode value. | ||
* | ||
* @return the subCode value | ||
*/ | ||
public ErrorSubCode subCode() { | ||
return this.subCode; | ||
} | ||
|
||
/** | ||
* 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 Error object itself. | ||
*/ | ||
public Error withMessage(String message) { | ||
this.message = message; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get the moreDetails value. | ||
* | ||
* @return the moreDetails value | ||
*/ | ||
public String moreDetails() { | ||
return this.moreDetails; | ||
} | ||
|
||
/** | ||
* Get the parameter value. | ||
* | ||
* @return the parameter value | ||
*/ | ||
public String parameter() { | ||
return this.parameter; | ||
} | ||
|
||
/** | ||
* Get the value value. | ||
* | ||
* @return the value value | ||
*/ | ||
public String value() { | ||
return this.value; | ||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
.../spellcheck/src/main/java/com/microsoft/azure/cognitiveservices/spellcheck/ErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.cognitiveservices.spellcheck; | ||
|
||
import java.util.Collection; | ||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.microsoft.rest.ExpandableStringEnum; | ||
|
||
/** | ||
* Defines values for ErrorCode. | ||
*/ | ||
public final class ErrorCode extends ExpandableStringEnum<ErrorCode> { | ||
/** Static value None for ErrorCode. */ | ||
public static final ErrorCode NONE = fromString("None"); | ||
|
||
/** Static value ServerError for ErrorCode. */ | ||
public static final ErrorCode SERVER_ERROR = fromString("ServerError"); | ||
|
||
/** Static value InvalidRequest for ErrorCode. */ | ||
public static final ErrorCode INVALID_REQUEST = fromString("InvalidRequest"); | ||
|
||
/** Static value RateLimitExceeded for ErrorCode. */ | ||
public static final ErrorCode RATE_LIMIT_EXCEEDED = fromString("RateLimitExceeded"); | ||
|
||
/** Static value InvalidAuthorization for ErrorCode. */ | ||
public static final ErrorCode INVALID_AUTHORIZATION = fromString("InvalidAuthorization"); | ||
|
||
/** Static value InsufficientAuthorization for ErrorCode. */ | ||
public static final ErrorCode INSUFFICIENT_AUTHORIZATION = fromString("InsufficientAuthorization"); | ||
|
||
/** | ||
* Creates or finds a ErrorCode from its string representation. | ||
* @param name a name to look for | ||
* @return the corresponding ErrorCode | ||
*/ | ||
@JsonCreator | ||
public static ErrorCode fromString(String name) { | ||
return fromString(name, ErrorCode.class); | ||
} | ||
|
||
/** | ||
* @return known ErrorCode values | ||
*/ | ||
public static Collection<ErrorCode> values() { | ||
return values(ErrorCode.class); | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
...llcheck/src/main/java/com/microsoft/azure/cognitiveservices/spellcheck/ErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* 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.cognitiveservices.spellcheck; | ||
|
||
import java.util.List; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
|
||
/** | ||
* The top-level response that represents a failed request. | ||
*/ | ||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type") | ||
@JsonTypeName("ErrorResponse") | ||
public class ErrorResponse extends Response { | ||
/** | ||
* A list of errors that describe the reasons why the request failed. | ||
*/ | ||
@JsonProperty(value = "errors", required = true) | ||
private List<Error> errors; | ||
|
||
/** | ||
* Get the errors value. | ||
* | ||
* @return the errors value | ||
*/ | ||
public List<Error> errors() { | ||
return this.errors; | ||
} | ||
|
||
/** | ||
* Set the errors value. | ||
* | ||
* @param errors the errors value to set | ||
* @return the ErrorResponse object itself. | ||
*/ | ||
public ErrorResponse withErrors(List<Error> errors) { | ||
this.errors = errors; | ||
return this; | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...rc/main/java/com/microsoft/azure/cognitiveservices/spellcheck/ErrorResponseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.cognitiveservices.spellcheck; | ||
|
||
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(); | ||
} | ||
} |
Oops, something went wrong.