forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 11407 in Azure/azure-rest-api-specs
Merge 2392aa8408d4b622ecfc2636b13f27d2e660e250 into 03adb71b88d846cb2870d7dee5cfc65db478c418
- Loading branch information
SDKAuto
committed
Nov 24, 2020
1 parent
458be34
commit cfdaf53
Showing
10 changed files
with
268 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
252 changes: 252 additions & 0 deletions
252
.../management/storagecache/v2019_08_01/implementation/StorageCacheManagementClientImpl.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,252 @@ | ||
/** | ||
* 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.storagecache.v2019_08_01.implementation; | ||
|
||
import com.microsoft.azure.AzureClient; | ||
import com.microsoft.azure.AzureServiceClient; | ||
import com.microsoft.rest.credentials.ServiceClientCredentials; | ||
import com.microsoft.rest.RestClient; | ||
|
||
/** | ||
* Initializes a new instance of the StorageCacheManagementClientImpl class. | ||
*/ | ||
public class StorageCacheManagementClientImpl extends AzureServiceClient { | ||
/** 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; | ||
} | ||
|
||
/** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ | ||
private String subscriptionId; | ||
|
||
/** | ||
* Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. | ||
* | ||
* @return the subscriptionId value. | ||
*/ | ||
public String subscriptionId() { | ||
return this.subscriptionId; | ||
} | ||
|
||
/** | ||
* Sets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. | ||
* | ||
* @param subscriptionId the subscriptionId value. | ||
* @return the service client itself | ||
*/ | ||
public StorageCacheManagementClientImpl withSubscriptionId(String subscriptionId) { | ||
this.subscriptionId = subscriptionId; | ||
return this; | ||
} | ||
|
||
/** Client Api Version. */ | ||
private String apiVersion; | ||
|
||
/** | ||
* Gets Client Api Version. | ||
* | ||
* @return the apiVersion value. | ||
*/ | ||
public String apiVersion() { | ||
return this.apiVersion; | ||
} | ||
|
||
/** 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 StorageCacheManagementClientImpl 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 StorageCacheManagementClientImpl 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 StorageCacheManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { | ||
this.generateClientRequestId = generateClientRequestId; | ||
return this; | ||
} | ||
|
||
/** | ||
* The OperationsInner object to access its operations. | ||
*/ | ||
private OperationsInner operations; | ||
|
||
/** | ||
* Gets the OperationsInner object to access its operations. | ||
* @return the OperationsInner object. | ||
*/ | ||
public OperationsInner operations() { | ||
return this.operations; | ||
} | ||
|
||
/** | ||
* The SkusInner object to access its operations. | ||
*/ | ||
private SkusInner skus; | ||
|
||
/** | ||
* Gets the SkusInner object to access its operations. | ||
* @return the SkusInner object. | ||
*/ | ||
public SkusInner skus() { | ||
return this.skus; | ||
} | ||
|
||
/** | ||
* The UsageModelsInner object to access its operations. | ||
*/ | ||
private UsageModelsInner usageModels; | ||
|
||
/** | ||
* Gets the UsageModelsInner object to access its operations. | ||
* @return the UsageModelsInner object. | ||
*/ | ||
public UsageModelsInner usageModels() { | ||
return this.usageModels; | ||
} | ||
|
||
/** | ||
* The CachesInner object to access its operations. | ||
*/ | ||
private CachesInner caches; | ||
|
||
/** | ||
* Gets the CachesInner object to access its operations. | ||
* @return the CachesInner object. | ||
*/ | ||
public CachesInner caches() { | ||
return this.caches; | ||
} | ||
|
||
/** | ||
* The StorageTargetsInner object to access its operations. | ||
*/ | ||
private StorageTargetsInner storageTargets; | ||
|
||
/** | ||
* Gets the StorageTargetsInner object to access its operations. | ||
* @return the StorageTargetsInner object. | ||
*/ | ||
public StorageTargetsInner storageTargets() { | ||
return this.storageTargets; | ||
} | ||
|
||
/** | ||
* Initializes an instance of StorageCacheManagementClient client. | ||
* | ||
* @param credentials the management credentials for Azure | ||
*/ | ||
public StorageCacheManagementClientImpl(ServiceClientCredentials credentials) { | ||
this("https://management.azure.com", credentials); | ||
} | ||
|
||
/** | ||
* Initializes an instance of StorageCacheManagementClient client. | ||
* | ||
* @param baseUrl the base URL of the host | ||
* @param credentials the management credentials for Azure | ||
*/ | ||
public StorageCacheManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { | ||
super(baseUrl, credentials); | ||
initialize(); | ||
} | ||
|
||
/** | ||
* Initializes an instance of StorageCacheManagementClient client. | ||
* | ||
* @param restClient the REST client to connect to Azure. | ||
*/ | ||
public StorageCacheManagementClientImpl(RestClient restClient) { | ||
super(restClient); | ||
initialize(); | ||
} | ||
|
||
protected void initialize() { | ||
this.apiVersion = "2019-08-01-preview"; | ||
this.acceptLanguage = "en-US"; | ||
this.longRunningOperationRetryTimeout = 30; | ||
this.generateClientRequestId = true; | ||
this.operations = new OperationsInner(restClient().retrofit(), this); | ||
this.skus = new SkusInner(restClient().retrofit(), this); | ||
this.usageModels = new UsageModelsInner(restClient().retrofit(), this); | ||
this.caches = new CachesInner(restClient().retrofit(), this); | ||
this.storageTargets = new StorageTargetsInner(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, auto-generated)", super.userAgent(), "StorageCacheManagementClient", "2019-08-01-preview"); | ||
} | ||
} |
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
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
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
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
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