Skip to content
Merged
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
Expand Up @@ -9,7 +9,6 @@
package com.microsoft.azure.cognitiveservices.vision.contentmoderator;

import com.microsoft.azure.AzureClient;
import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AzureRegionBaseUrl;
import com.microsoft.rest.RestClient;

/**
Expand Down Expand Up @@ -37,19 +36,19 @@ public interface ContentModeratorClient {
String userAgent();

/**
* Gets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'.
* Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com)..
*
* @return the baseUrl value.
* @return the endpoint value.
*/
AzureRegionBaseUrl baseUrl();
String endpoint();

/**
* Sets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'.
* Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com)..
*
* @param baseUrl the baseUrl value.
* @param endpoint the endpoint value.
* @return the service client itself
*/
ContentModeratorClient withBaseUrl(AzureRegionBaseUrl baseUrl);
ContentModeratorClient withEndpoint(String endpoint);

/**
* Gets Gets or sets the preferred language for the response..
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
package com.microsoft.azure.cognitiveservices.vision.contentmoderator;

import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException;
import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel;
import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Body;
import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ImageList;
import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import java.io.IOException;
import java.util.List;
import rx.Observable;

Expand All @@ -20,7 +24,6 @@
* in ListManagementImageLists.
*/
public interface ListManagementImageLists {

/**
* Returns the details of the image list with list Id equal to list Id passed.
*
Expand All @@ -32,6 +35,16 @@ public interface ListManagementImageLists {
*/
ImageList getDetails(String listId);

/**
* Returns the details of the image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
ServiceFuture<ImageList> getDetailsAsync(String listId, final ServiceCallback<ImageList> serviceCallback);

/**
* Returns the details of the image list with list Id equal to list Id passed.
*
Expand All @@ -41,7 +54,14 @@ public interface ListManagementImageLists {
*/
Observable<ImageList> getDetailsAsync(String listId);


/**
* Returns the details of the image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
*/
Observable<ServiceResponse<ImageList>> getDetailsWithServiceResponseAsync(String listId);

/**
* Deletes image list with the list Id equal to list Id passed.
Expand All @@ -54,6 +74,16 @@ public interface ListManagementImageLists {
*/
String delete(String listId);

/**
* Deletes image list with the list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
ServiceFuture<String> deleteAsync(String listId, final ServiceCallback<String> serviceCallback);

/**
* Deletes image list with the list Id equal to list Id passed.
*
Expand All @@ -63,57 +93,104 @@ public interface ListManagementImageLists {
*/
Observable<String> deleteAsync(String listId);


/**
* Deletes image list with the list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
Observable<ServiceResponse<String>> deleteWithServiceResponseAsync(String listId);

/**
* Updates an image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param contentType The content type.
* @param bodyParameter Schema of the body.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageList object if successful.
*/
ImageList update(String listId, String contentType, BodyModel bodyParameter);
ImageList update(String listId, String contentType, Body body);

/**
* Updates an image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param contentType The content type.
* @param bodyParameter Schema of the body.
* @param body Schema of the body.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
* @return the {@link ServiceFuture} object
*/
Observable<ImageList> updateAsync(String listId, String contentType, BodyModel bodyParameter);
ServiceFuture<ImageList> updateAsync(String listId, String contentType, Body body, final ServiceCallback<ImageList> serviceCallback);

/**
* Updates an image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param contentType The content type.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
*/
Observable<ImageList> updateAsync(String listId, String contentType, Body body);

/**
* Updates an image list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param contentType The content type.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
*/
Observable<ServiceResponse<ImageList>> updateWithServiceResponseAsync(String listId, String contentType, Body body);

/**
* Creates an image list.
*
* @param contentType The content type.
* @param bodyParameter Schema of the body.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws APIErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageList object if successful.
*/
ImageList create(String contentType, BodyModel bodyParameter);
ImageList create(String contentType, Body body);

/**
* Creates an image list.
*
* @param contentType The content type.
* @param bodyParameter Schema of the body.
* @param body Schema of the body.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
* @return the {@link ServiceFuture} object
*/
Observable<ImageList> createAsync(String contentType, BodyModel bodyParameter);
ServiceFuture<ImageList> createAsync(String contentType, Body body, final ServiceCallback<ImageList> serviceCallback);

/**
* Creates an image list.
*
* @param contentType The content type.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
*/
Observable<ImageList> createAsync(String contentType, Body body);

/**
* Creates an image list.
*
* @param contentType The content type.
* @param body Schema of the body.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageList object
*/
Observable<ServiceResponse<ImageList>> createWithServiceResponseAsync(String contentType, Body body);

/**
* Gets all the Image Lists.
Expand All @@ -125,6 +202,15 @@ public interface ListManagementImageLists {
*/
List<ImageList> getAllImageLists();

/**
* Gets all the Image Lists.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
ServiceFuture<List<ImageList>> getAllImageListsAsync(final ServiceCallback<List<ImageList>> serviceCallback);

/**
* Gets all the Image Lists.
*
Expand All @@ -133,7 +219,13 @@ public interface ListManagementImageLists {
*/
Observable<List<ImageList>> getAllImageListsAsync();


/**
* Gets all the Image Lists.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List&lt;ImageList&gt; object
*/
Observable<ServiceResponse<List<ImageList>>> getAllImageListsWithServiceResponseAsync();

/**
* Refreshes the index of the list with list Id equal to list Id passed.
Expand All @@ -146,6 +238,16 @@ public interface ListManagementImageLists {
*/
RefreshIndex refreshIndexMethod(String listId);

/**
* Refreshes the index of the list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
ServiceFuture<RefreshIndex> refreshIndexMethodAsync(String listId, final ServiceCallback<RefreshIndex> serviceCallback);

/**
* Refreshes the index of the list with list Id equal to list Id passed.
*
Expand All @@ -155,5 +257,13 @@ public interface ListManagementImageLists {
*/
Observable<RefreshIndex> refreshIndexMethodAsync(String listId);

/**
* Refreshes the index of the list with list Id equal to list Id passed.
*
* @param listId List Id of the image list.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the RefreshIndex object
*/
Observable<ServiceResponse<RefreshIndex>> refreshIndexMethodWithServiceResponseAsync(String listId);

}
Loading