-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 8c06db2fa637414051778b41e2dc06259784cceb (#2680)
typo: cognitiveservices/data-plane/ImageSearch - Inisghts -> Insights
- Loading branch information
1 parent
47fc8dd
commit 3740db7
Showing
51 changed files
with
1,837 additions
and
155 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
...main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/ImageSearchClient.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,104 @@ | ||
/** | ||
* 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.search.imagesearch; | ||
|
||
import com.microsoft.azure.AzureClient; | ||
import com.microsoft.rest.RestClient; | ||
|
||
/** | ||
* The interface for ImageSearchClient class. | ||
*/ | ||
public interface ImageSearchClient { | ||
/** | ||
* Gets the REST client. | ||
* | ||
* @return the {@link RestClient} object. | ||
*/ | ||
RestClient restClient(); | ||
|
||
/** | ||
* Gets the {@link AzureClient} used for long running operations. | ||
* @return the azure client; | ||
*/ | ||
AzureClient getAzureClient(); | ||
|
||
/** | ||
* Gets the User-Agent header for the client. | ||
* | ||
* @return the user agent string. | ||
*/ | ||
String userAgent(); | ||
|
||
/** | ||
* Gets Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").. | ||
* | ||
* @return the endpoint value. | ||
*/ | ||
String endpoint(); | ||
|
||
/** | ||
* Sets Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com").. | ||
* | ||
* @param endpoint the endpoint value. | ||
* @return the service client itself | ||
*/ | ||
ImageSearchClient withEndpoint(String endpoint); | ||
|
||
/** | ||
* Gets The preferred language for the response.. | ||
* | ||
* @return the acceptLanguage value. | ||
*/ | ||
String acceptLanguage(); | ||
|
||
/** | ||
* Sets The preferred language for the response.. | ||
* | ||
* @param acceptLanguage the acceptLanguage value. | ||
* @return the service client itself | ||
*/ | ||
ImageSearchClient withAcceptLanguage(String acceptLanguage); | ||
|
||
/** | ||
* Gets The retry timeout in seconds for Long Running Operations. Default value is 30.. | ||
* | ||
* @return the longRunningOperationRetryTimeout value. | ||
*/ | ||
int longRunningOperationRetryTimeout(); | ||
|
||
/** | ||
* Sets The retry timeout in seconds for Long Running Operations. Default value is 30.. | ||
* | ||
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. | ||
* @return the service client itself | ||
*/ | ||
ImageSearchClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); | ||
|
||
/** | ||
* Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. | ||
* | ||
* @return the generateClientRequestId value. | ||
*/ | ||
boolean generateClientRequestId(); | ||
|
||
/** | ||
* Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. | ||
* | ||
* @param generateClientRequestId the generateClientRequestId value. | ||
* @return the service client itself | ||
*/ | ||
ImageSearchClient withGenerateClientRequestId(boolean generateClientRequestId); | ||
|
||
/** | ||
* Gets the Images object to access its operations. | ||
* @return the Images object. | ||
*/ | ||
Images images(); | ||
|
||
} |
480 changes: 480 additions & 0 deletions
480
...search/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/Images.java
Large diffs are not rendered by default.
Oops, something went wrong.
186 changes: 186 additions & 0 deletions
186
...soft/azure/cognitiveservices/search/imagesearch/implementation/ImageSearchClientImpl.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,186 @@ | ||
/** | ||
* 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.search.imagesearch.implementation; | ||
|
||
import com.microsoft.azure.AzureClient; | ||
import com.microsoft.azure.AzureServiceClient; | ||
import com.microsoft.azure.cognitiveservices.search.imagesearch.Images; | ||
import com.microsoft.azure.cognitiveservices.search.imagesearch.ImageSearchClient; | ||
import com.microsoft.rest.credentials.ServiceClientCredentials; | ||
import com.microsoft.rest.RestClient; | ||
|
||
/** | ||
* Initializes a new instance of the ImageSearchClientImpl class. | ||
*/ | ||
public class ImageSearchClientImpl extends AzureServiceClient implements ImageSearchClient { | ||
/** the {@link AzureClient} used for long running operations. */ | ||
private AzureClient azureClient; | ||
|
||
/** | ||
* Gets the {@link AzureClient} used for long running operations. | ||
* @return the azure client; | ||
*/ | ||
public AzureClient getAzureClient() { | ||
return this.azureClient; | ||
} | ||
|
||
/** Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ | ||
private String endpoint; | ||
|
||
/** | ||
* Gets Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). | ||
* | ||
* @return the endpoint value. | ||
*/ | ||
public String endpoint() { | ||
return this.endpoint; | ||
} | ||
|
||
/** | ||
* Sets Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). | ||
* | ||
* @param endpoint the endpoint value. | ||
* @return the service client itself | ||
*/ | ||
public ImageSearchClientImpl withEndpoint(String endpoint) { | ||
this.endpoint = endpoint; | ||
return this; | ||
} | ||
|
||
/** The preferred language for the response. */ | ||
private String acceptLanguage; | ||
|
||
/** | ||
* Gets The preferred language for the response. | ||
* | ||
* @return the acceptLanguage value. | ||
*/ | ||
public String acceptLanguage() { | ||
return this.acceptLanguage; | ||
} | ||
|
||
/** | ||
* Sets The preferred language for the response. | ||
* | ||
* @param acceptLanguage the acceptLanguage value. | ||
* @return the service client itself | ||
*/ | ||
public ImageSearchClientImpl withAcceptLanguage(String acceptLanguage) { | ||
this.acceptLanguage = acceptLanguage; | ||
return this; | ||
} | ||
|
||
/** The retry timeout in seconds for Long Running Operations. Default value is 30. */ | ||
private int longRunningOperationRetryTimeout; | ||
|
||
/** | ||
* Gets The retry timeout in seconds for Long Running Operations. Default value is 30. | ||
* | ||
* @return the longRunningOperationRetryTimeout value. | ||
*/ | ||
public int longRunningOperationRetryTimeout() { | ||
return this.longRunningOperationRetryTimeout; | ||
} | ||
|
||
/** | ||
* Sets The retry timeout in seconds for Long Running Operations. Default value is 30. | ||
* | ||
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. | ||
* @return the service client itself | ||
*/ | ||
public ImageSearchClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { | ||
this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; | ||
return this; | ||
} | ||
|
||
/** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ | ||
private boolean generateClientRequestId; | ||
|
||
/** | ||
* Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. | ||
* | ||
* @return the generateClientRequestId value. | ||
*/ | ||
public boolean generateClientRequestId() { | ||
return this.generateClientRequestId; | ||
} | ||
|
||
/** | ||
* Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. | ||
* | ||
* @param generateClientRequestId the generateClientRequestId value. | ||
* @return the service client itself | ||
*/ | ||
public ImageSearchClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { | ||
this.generateClientRequestId = generateClientRequestId; | ||
return this; | ||
} | ||
|
||
/** | ||
* The Images object to access its operations. | ||
*/ | ||
private Images images; | ||
|
||
/** | ||
* Gets the Images object to access its operations. | ||
* @return the Images object. | ||
*/ | ||
public Images images() { | ||
return this.images; | ||
} | ||
|
||
/** | ||
* Initializes an instance of ImageSearchClient client. | ||
* | ||
* @param credentials the management credentials for Azure | ||
*/ | ||
public ImageSearchClientImpl(ServiceClientCredentials credentials) { | ||
this("https://{Endpoint}/bing/v7.0", credentials); | ||
} | ||
|
||
/** | ||
* Initializes an instance of ImageSearchClient client. | ||
* | ||
* @param baseUrl the base URL of the host | ||
* @param credentials the management credentials for Azure | ||
*/ | ||
private ImageSearchClientImpl(String baseUrl, ServiceClientCredentials credentials) { | ||
super(baseUrl, credentials); | ||
initialize(); | ||
} | ||
|
||
/** | ||
* Initializes an instance of ImageSearchClient client. | ||
* | ||
* @param restClient the REST client to connect to Azure. | ||
*/ | ||
public ImageSearchClientImpl(RestClient restClient) { | ||
super(restClient); | ||
initialize(); | ||
} | ||
|
||
protected void initialize() { | ||
this.endpoint = "https://api.cognitive.microsoft.com"; | ||
this.acceptLanguage = "en-US"; | ||
this.longRunningOperationRetryTimeout = 30; | ||
this.generateClientRequestId = true; | ||
this.images = new ImagesImpl(restClient().retrofit(), this); | ||
this.azureClient = new AzureClient(this); | ||
} | ||
|
||
/** | ||
* Gets the User-Agent header for the client. | ||
* | ||
* @return the user agent string. | ||
*/ | ||
@Override | ||
public String userAgent() { | ||
return String.format("%s (%s, %s)", super.userAgent(), "ImageSearchClient", "1.0"); | ||
} | ||
} |
Oops, something went wrong.