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.
/** * 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.containerservice.implementation; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.Query; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in ResolvePrivateLinkServiceIds.
/** * An instance of this class provides access to all the operations defined * in ResolvePrivateLinkServiceIds. */
public class ResolvePrivateLinkServiceIdsInner {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private ResolvePrivateLinkServiceIdsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private ContainerServiceManagementClientImpl client;
Initializes an instance of ResolvePrivateLinkServiceIdsInner.
Params:
  • retrofit – the Retrofit instance built from a Retrofit Builder.
  • client – the instance of the service client containing this operation class.
/** * Initializes an instance of ResolvePrivateLinkServiceIdsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public ResolvePrivateLinkServiceIdsInner(Retrofit retrofit, ContainerServiceManagementClientImpl client) { this.service = retrofit.create(ResolvePrivateLinkServiceIdsService.class); this.client = client; }
The interface defining all the services for ResolvePrivateLinkServiceIds to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for ResolvePrivateLinkServiceIds to be * used by Retrofit to perform actually REST calls. */
interface ResolvePrivateLinkServiceIdsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.containerservice.ResolvePrivateLinkServiceIds pOST" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId") Observable<Response<ResponseBody>> pOST(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Body PrivateLinkResourceInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster.
Params:
  • resourceGroupName – The name of the resource group.
  • resourceName – The name of the managed cluster resource.
  • parameters – Parameters (name, groupId) supplied in order to resolve a private link service ID.
Throws:
Returns:the PrivateLinkResourceInner object if successful.
/** * Gets the private link service ID for the specified managed cluster. * Gets the private link service ID the specified managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PrivateLinkResourceInner object if successful. */
public PrivateLinkResourceInner pOST(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { return pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); }
Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster.
Params:
  • resourceGroupName – The name of the resource group.
  • resourceName – The name of the managed cluster resource.
  • parameters – Parameters (name, groupId) supplied in order to resolve a private link service ID.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets the private link service ID for the specified managed cluster. * Gets the private link service ID the specified managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<PrivateLinkResourceInner> pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters, final ServiceCallback<PrivateLinkResourceInner> serviceCallback) { return ServiceFuture.fromResponse(pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallback); }
Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster.
Params:
  • resourceGroupName – The name of the resource group.
  • resourceName – The name of the managed cluster resource.
  • parameters – Parameters (name, groupId) supplied in order to resolve a private link service ID.
Throws:
Returns:the observable to the PrivateLinkResourceInner object
/** * Gets the private link service ID for the specified managed cluster. * Gets the private link service ID the specified managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkResourceInner object */
public Observable<PrivateLinkResourceInner> pOSTAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { return pOSTWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<PrivateLinkResourceInner>, PrivateLinkResourceInner>() { @Override public PrivateLinkResourceInner call(ServiceResponse<PrivateLinkResourceInner> response) { return response.body(); } }); }
Gets the private link service ID for the specified managed cluster. Gets the private link service ID the specified managed cluster.
Params:
  • resourceGroupName – The name of the resource group.
  • resourceName – The name of the managed cluster resource.
  • parameters – Parameters (name, groupId) supplied in order to resolve a private link service ID.
Throws:
Returns:the observable to the PrivateLinkResourceInner object
/** * Gets the private link service ID for the specified managed cluster. * Gets the private link service ID the specified managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param parameters Parameters (name, groupId) supplied in order to resolve a private link service ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkResourceInner object */
public Observable<ServiceResponse<PrivateLinkResourceInner>> pOSTWithServiceResponseAsync(String resourceGroupName, String resourceName, PrivateLinkResourceInner parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (resourceName == null) { throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); final String apiVersion = "2020-09-01"; return service.pOST(this.client.subscriptionId(), resourceGroupName, resourceName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<PrivateLinkResourceInner>>>() { @Override public Observable<ServiceResponse<PrivateLinkResourceInner>> call(Response<ResponseBody> response) { try { ServiceResponse<PrivateLinkResourceInner> clientResponse = pOSTDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PrivateLinkResourceInner> pOSTDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PrivateLinkResourceInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PrivateLinkResourceInner>() { }.getType()) .registerError(CloudException.class) .build(response); } }