repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/serializer/HttpResponseHeaderDecoder.java
HttpResponseHeaderDecoder.deserializeHeaders
private static Object deserializeHeaders(HttpHeaders headers, SerializerAdapter serializer, HttpResponseDecodeData decodeData) throws IOException { final Type deserializedHeadersType = decodeData.headersType(); if (deserializedHeadersType == null) { return null; } else { final String headersJsonString = serializer.serialize(headers, SerializerEncoding.JSON); Object deserializedHeaders = serializer.deserialize(headersJsonString, deserializedHeadersType, SerializerEncoding.JSON); final Class<?> deserializedHeadersClass = TypeUtil.getRawClass(deserializedHeadersType); final Field[] declaredFields = deserializedHeadersClass.getDeclaredFields(); for (final Field declaredField : declaredFields) { if (declaredField.isAnnotationPresent(HeaderCollection.class)) { final Type declaredFieldType = declaredField.getGenericType(); if (TypeUtil.isTypeOrSubTypeOf(declaredField.getType(), Map.class)) { final Type[] mapTypeArguments = TypeUtil.getTypeArguments(declaredFieldType); if (mapTypeArguments.length == 2 && mapTypeArguments[0] == String.class && mapTypeArguments[1] == String.class) { final HeaderCollection headerCollectionAnnotation = declaredField.getAnnotation(HeaderCollection.class); final String headerCollectionPrefix = headerCollectionAnnotation.value().toLowerCase(Locale.ROOT); final int headerCollectionPrefixLength = headerCollectionPrefix.length(); if (headerCollectionPrefixLength > 0) { final Map<String, String> headerCollection = new HashMap<>(); for (final HttpHeader header : headers) { final String headerName = header.name(); if (headerName.toLowerCase(Locale.ROOT).startsWith(headerCollectionPrefix)) { headerCollection.put(headerName.substring(headerCollectionPrefixLength), header.value()); } } final boolean declaredFieldAccessibleBackup = declaredField.isAccessible(); try { if (!declaredFieldAccessibleBackup) { declaredField.setAccessible(true); } declaredField.set(deserializedHeaders, headerCollection); } catch (IllegalAccessException ignored) { } finally { if (!declaredFieldAccessibleBackup) { declaredField.setAccessible(declaredFieldAccessibleBackup); } } } } } } } return deserializedHeaders; } }
java
private static Object deserializeHeaders(HttpHeaders headers, SerializerAdapter serializer, HttpResponseDecodeData decodeData) throws IOException { final Type deserializedHeadersType = decodeData.headersType(); if (deserializedHeadersType == null) { return null; } else { final String headersJsonString = serializer.serialize(headers, SerializerEncoding.JSON); Object deserializedHeaders = serializer.deserialize(headersJsonString, deserializedHeadersType, SerializerEncoding.JSON); final Class<?> deserializedHeadersClass = TypeUtil.getRawClass(deserializedHeadersType); final Field[] declaredFields = deserializedHeadersClass.getDeclaredFields(); for (final Field declaredField : declaredFields) { if (declaredField.isAnnotationPresent(HeaderCollection.class)) { final Type declaredFieldType = declaredField.getGenericType(); if (TypeUtil.isTypeOrSubTypeOf(declaredField.getType(), Map.class)) { final Type[] mapTypeArguments = TypeUtil.getTypeArguments(declaredFieldType); if (mapTypeArguments.length == 2 && mapTypeArguments[0] == String.class && mapTypeArguments[1] == String.class) { final HeaderCollection headerCollectionAnnotation = declaredField.getAnnotation(HeaderCollection.class); final String headerCollectionPrefix = headerCollectionAnnotation.value().toLowerCase(Locale.ROOT); final int headerCollectionPrefixLength = headerCollectionPrefix.length(); if (headerCollectionPrefixLength > 0) { final Map<String, String> headerCollection = new HashMap<>(); for (final HttpHeader header : headers) { final String headerName = header.name(); if (headerName.toLowerCase(Locale.ROOT).startsWith(headerCollectionPrefix)) { headerCollection.put(headerName.substring(headerCollectionPrefixLength), header.value()); } } final boolean declaredFieldAccessibleBackup = declaredField.isAccessible(); try { if (!declaredFieldAccessibleBackup) { declaredField.setAccessible(true); } declaredField.set(deserializedHeaders, headerCollection); } catch (IllegalAccessException ignored) { } finally { if (!declaredFieldAccessibleBackup) { declaredField.setAccessible(declaredFieldAccessibleBackup); } } } } } } } return deserializedHeaders; } }
[ "private", "static", "Object", "deserializeHeaders", "(", "HttpHeaders", "headers", ",", "SerializerAdapter", "serializer", ",", "HttpResponseDecodeData", "decodeData", ")", "throws", "IOException", "{", "final", "Type", "deserializedHeadersType", "=", "decodeData", ".", ...
Deserialize the provided headers returned from a REST API to an entity instance declared as the model to hold 'Matching' headers. 'Matching' headers are the REST API returned headers those with: 1. header names same as name of a properties in the entity. 2. header names start with value of {@link HeaderCollection} annotation applied to the properties in the entity. When needed, the 'header entity' types must be declared as first generic argument of {@link ResponseBase} returned by java proxy method corresponding to the REST API. e.g. {@code Mono<RestResponseBase<FooMetadataHeaders, Void>> getMetadata(args);} {@code class FooMetadataHeaders { String name; @HeaderCollection("header-collection-prefix-") Map<String,String> headerCollection; } } in the case of above example, this method produces an instance of FooMetadataHeaders from provided {@headers}. @param headers the REST API returned headers @return instance of header entity type created based on provided {@headers}, if header entity model does not exists then return null @throws IOException
[ "Deserialize", "the", "provided", "headers", "returned", "from", "a", "REST", "API", "to", "an", "entity", "instance", "declared", "as", "the", "model", "to", "hold", "Matching", "headers", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/serializer/HttpResponseHeaderDecoder.java#L80-L127
train
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.getByResourceGroupAsync
public Observable<AppServiceEnvironmentResourceInner> getByResourceGroupAsync(String resourceGroupName, String name) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<AppServiceEnvironmentResourceInner>, AppServiceEnvironmentResourceInner>() { @Override public AppServiceEnvironmentResourceInner call(ServiceResponse<AppServiceEnvironmentResourceInner> response) { return response.body(); } }); }
java
public Observable<AppServiceEnvironmentResourceInner> getByResourceGroupAsync(String resourceGroupName, String name) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<AppServiceEnvironmentResourceInner>, AppServiceEnvironmentResourceInner>() { @Override public AppServiceEnvironmentResourceInner call(ServiceResponse<AppServiceEnvironmentResourceInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "AppServiceEnvironmentResourceInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", ...
Get the properties of an App Service Environment. Get the properties of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the AppServiceEnvironmentResourceInner object
[ "Get", "the", "properties", "of", "an", "App", "Service", "Environment", ".", "Get", "the", "properties", "of", "an", "App", "Service", "Environment", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L622-L629
train
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWebApps
public PagedList<SiteInner> listWebApps(final String resourceGroupName, final String name, final String propertiesToInclude) { ServiceResponse<Page<SiteInner>> response = listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); return new PagedList<SiteInner>(response.body()) { @Override public Page<SiteInner> nextPage(String nextPageLink) { return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
java
public PagedList<SiteInner> listWebApps(final String resourceGroupName, final String name, final String propertiesToInclude) { ServiceResponse<Page<SiteInner>> response = listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); return new PagedList<SiteInner>(response.body()) { @Override public Page<SiteInner> nextPage(String nextPageLink) { return listWebAppsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
[ "public", "PagedList", "<", "SiteInner", ">", "listWebApps", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "propertiesToInclude", ")", "{", "ServiceResponse", "<", "Page", "<", "SiteInner", ">>", "response", ...
Get all apps in an App Service Environment. Get all apps in an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param propertiesToInclude Comma separated list of app properties to include. @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 PagedList&lt;SiteInner&gt; object if successful.
[ "Get", "all", "apps", "in", "an", "App", "Service", "Environment", ".", "Get", "all", "apps", "in", "an", "App", "Service", "Environment", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L4318-L4326
train
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerUsagesInner.java
ServerUsagesInner.listByServerAsync
public Observable<List<ServerUsageInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ServerUsageInner>>, List<ServerUsageInner>>() { @Override public List<ServerUsageInner> call(ServiceResponse<List<ServerUsageInner>> response) { return response.body(); } }); }
java
public Observable<List<ServerUsageInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ServerUsageInner>>, List<ServerUsageInner>>() { @Override public List<ServerUsageInner> call(ServiceResponse<List<ServerUsageInner>> response) { return response.body(); } }); }
[ "public", "Observable", "<", "List", "<", "ServerUsageInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ...
Returns server usages. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;ServerUsageInner&gt; object
[ "Returns", "server", "usages", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerUsagesInner.java#L96-L103
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java
ContentKeyAuthorizationPolicy.get
public static EntityGetOperation<ContentKeyAuthorizationPolicyInfo> get(String contentKeyAuthorizationPolicyId) { return new DefaultGetOperation<ContentKeyAuthorizationPolicyInfo>(ENTITY_SET, contentKeyAuthorizationPolicyId, ContentKeyAuthorizationPolicyInfo.class); }
java
public static EntityGetOperation<ContentKeyAuthorizationPolicyInfo> get(String contentKeyAuthorizationPolicyId) { return new DefaultGetOperation<ContentKeyAuthorizationPolicyInfo>(ENTITY_SET, contentKeyAuthorizationPolicyId, ContentKeyAuthorizationPolicyInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "ContentKeyAuthorizationPolicyInfo", ">", "get", "(", "String", "contentKeyAuthorizationPolicyId", ")", "{", "return", "new", "DefaultGetOperation", "<", "ContentKeyAuthorizationPolicyInfo", ">", "(", "ENTITY_SET", ",", "conten...
Create an operation that will retrieve the given content key authorization policy @param contentKeyAuthorizationPolicyId id of content key authorization policy to retrieve @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "given", "content", "key", "authorization", "policy" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java#L85-L88
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java
ContentKeyAuthorizationPolicy.get
public static EntityGetOperation<ContentKeyAuthorizationPolicyInfo> get( LinkInfo<ContentKeyAuthorizationPolicyInfo> link) { return new DefaultGetOperation<ContentKeyAuthorizationPolicyInfo>(link.getHref(), ContentKeyAuthorizationPolicyInfo.class); }
java
public static EntityGetOperation<ContentKeyAuthorizationPolicyInfo> get( LinkInfo<ContentKeyAuthorizationPolicyInfo> link) { return new DefaultGetOperation<ContentKeyAuthorizationPolicyInfo>(link.getHref(), ContentKeyAuthorizationPolicyInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "ContentKeyAuthorizationPolicyInfo", ">", "get", "(", "LinkInfo", "<", "ContentKeyAuthorizationPolicyInfo", ">", "link", ")", "{", "return", "new", "DefaultGetOperation", "<", "ContentKeyAuthorizationPolicyInfo", ">", "(", "l...
Create an operation that will retrieve the content key authorization policy at the given link @param link the link @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "content", "key", "authorization", "policy", "at", "the", "given", "link" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java#L98-L102
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java
ContentKeyAuthorizationPolicy.linkOptions
public static EntityLinkOperation linkOptions(String contentKeyAuthorizationPolicyId, String contentKeyAuthorizationPolicyOptionId) { String escapedContentKeyId = null; try { escapedContentKeyId = URLEncoder.encode(contentKeyAuthorizationPolicyOptionId, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new InvalidParameterException("contentKeyId"); } URI contentKeyUri = URI .create(String.format("ContentKeyAuthorizationPolicyOptions('%s')", escapedContentKeyId)); return new EntityLinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyUri); }
java
public static EntityLinkOperation linkOptions(String contentKeyAuthorizationPolicyId, String contentKeyAuthorizationPolicyOptionId) { String escapedContentKeyId = null; try { escapedContentKeyId = URLEncoder.encode(contentKeyAuthorizationPolicyOptionId, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new InvalidParameterException("contentKeyId"); } URI contentKeyUri = URI .create(String.format("ContentKeyAuthorizationPolicyOptions('%s')", escapedContentKeyId)); return new EntityLinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyUri); }
[ "public", "static", "EntityLinkOperation", "linkOptions", "(", "String", "contentKeyAuthorizationPolicyId", ",", "String", "contentKeyAuthorizationPolicyOptionId", ")", "{", "String", "escapedContentKeyId", "=", "null", ";", "try", "{", "escapedContentKeyId", "=", "URLEncod...
Link a content key authorization policy options. @param contentKeyAuthorizationPolicyId the content key authorization policy id @param contentKeyAuthorizationPolicyOptionId the content key authorization policy option id @return the entity action operation
[ "Link", "a", "content", "key", "authorization", "policy", "options", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java#L138-L149
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java
ContentKeyAuthorizationPolicy.unlinkOptions
public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId, String contentKeyAuthorizationPolicyOptionId) { return new EntityUnlinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyAuthorizationPolicyOptionId); }
java
public static EntityUnlinkOperation unlinkOptions(String contentKeyAuthorizationPolicyId, String contentKeyAuthorizationPolicyOptionId) { return new EntityUnlinkOperation(ENTITY_SET, contentKeyAuthorizationPolicyId, "Options", contentKeyAuthorizationPolicyOptionId); }
[ "public", "static", "EntityUnlinkOperation", "unlinkOptions", "(", "String", "contentKeyAuthorizationPolicyId", ",", "String", "contentKeyAuthorizationPolicyOptionId", ")", "{", "return", "new", "EntityUnlinkOperation", "(", "ENTITY_SET", ",", "contentKeyAuthorizationPolicyId", ...
Unlink content key authorization policy options. @param assetId the asset id @param adpId the Asset Delivery Policy id @return the entity action operation
[ "Unlink", "content", "key", "authorization", "policy", "options", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicy.java#L160-L163
train
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java
NetworkInterfaceTapConfigurationsInner.beginDelete
public void beginDelete(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().single().body(); }
java
public void beginDelete(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ",", "String", "tapConfigurationName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkInterfaceName", ",", "tapConfigurationNam...
Deletes the specified tap configuration from the NetworkInterface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @param tapConfigurationName The name of the tap configuration. @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
[ "Deletes", "the", "specified", "tap", "configuration", "from", "the", "NetworkInterface", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/NetworkInterfaceTapConfigurationsInner.java#L177-L179
train
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceObjectivesInner.java
ServiceObjectivesInner.listByServerAsync
public Observable<List<ServiceObjectiveInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ServiceObjectiveInner>>, List<ServiceObjectiveInner>>() { @Override public List<ServiceObjectiveInner> call(ServiceResponse<List<ServiceObjectiveInner>> response) { return response.body(); } }); }
java
public Observable<List<ServiceObjectiveInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ServiceObjectiveInner>>, List<ServiceObjectiveInner>>() { @Override public List<ServiceObjectiveInner> call(ServiceResponse<List<ServiceObjectiveInner>> response) { return response.body(); } }); }
[ "public", "Observable", "<", "List", "<", "ServiceObjectiveInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")...
Returns database service objectives. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;ServiceObjectiveInner&gt; object
[ "Returns", "database", "service", "objectives", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceObjectivesInner.java#L193-L200
train
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getByResourceGroupAsync
public Observable<IotHubDescriptionInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<IotHubDescriptionInner>, IotHubDescriptionInner>() { @Override public IotHubDescriptionInner call(ServiceResponse<IotHubDescriptionInner> response) { return response.body(); } }); }
java
public Observable<IotHubDescriptionInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<IotHubDescriptionInner>, IotHubDescriptionInner>() { @Override public IotHubDescriptionInner call(ServiceResponse<IotHubDescriptionInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "IotHubDescriptionInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", "....
Get the non-security related metadata of an IoT hub. Get the non-security related metadata of an IoT hub. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the IotHubDescriptionInner object
[ "Get", "the", "non", "-", "security", "related", "metadata", "of", "an", "IoT", "hub", ".", "Get", "the", "non", "-", "security", "related", "metadata", "of", "an", "IoT", "hub", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L254-L261
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/InternalHelper.java
InternalHelper.inheritClientBehaviorsAndSetPublicProperty
public static void inheritClientBehaviorsAndSetPublicProperty(IInheritedBehaviors inheritingObject, Iterable<BatchClientBehavior> baseBehaviors) { // implement inheritance of behaviors List<BatchClientBehavior> customBehaviors = new ArrayList<>(); // if there were any behaviors, pre-populate the collection (ie: inherit) if (null != baseBehaviors) { for (BatchClientBehavior be : baseBehaviors) { customBehaviors.add(be); } } // set the public property inheritingObject.withCustomBehaviors(customBehaviors); }
java
public static void inheritClientBehaviorsAndSetPublicProperty(IInheritedBehaviors inheritingObject, Iterable<BatchClientBehavior> baseBehaviors) { // implement inheritance of behaviors List<BatchClientBehavior> customBehaviors = new ArrayList<>(); // if there were any behaviors, pre-populate the collection (ie: inherit) if (null != baseBehaviors) { for (BatchClientBehavior be : baseBehaviors) { customBehaviors.add(be); } } // set the public property inheritingObject.withCustomBehaviors(customBehaviors); }
[ "public", "static", "void", "inheritClientBehaviorsAndSetPublicProperty", "(", "IInheritedBehaviors", "inheritingObject", ",", "Iterable", "<", "BatchClientBehavior", ">", "baseBehaviors", ")", "{", "// implement inheritance of behaviors", "List", "<", "BatchClientBehavior", ">...
Inherit the BatchClientBehavior classes from parent object @param inheritingObject the inherit object @param baseBehaviors base class behavior list
[ "Inherit", "the", "BatchClientBehavior", "classes", "from", "parent", "object" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/InternalHelper.java#L19-L32
train
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java
ListManagementImageListsImpl.refreshIndexMethodAsync
public ServiceFuture<RefreshIndex> refreshIndexMethodAsync(String listId, final ServiceCallback<RefreshIndex> serviceCallback) { return ServiceFuture.fromResponse(refreshIndexMethodWithServiceResponseAsync(listId), serviceCallback); }
java
public ServiceFuture<RefreshIndex> refreshIndexMethodAsync(String listId, final ServiceCallback<RefreshIndex> serviceCallback) { return ServiceFuture.fromResponse(refreshIndexMethodWithServiceResponseAsync(listId), serviceCallback); }
[ "public", "ServiceFuture", "<", "RefreshIndex", ">", "refreshIndexMethodAsync", "(", "String", "listId", ",", "final", "ServiceCallback", "<", "RefreshIndex", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", "fromResponse", "(", "refreshIndexMethodWithS...
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
[ "Refreshes", "the", "index", "of", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java#L512-L514
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.getSubscriptions
public List<SubscriptionDescription> getSubscriptions(String topicName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.getSubscriptionsAsync(topicName)); }
java
public List<SubscriptionDescription> getSubscriptions(String topicName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.getSubscriptionsAsync(topicName)); }
[ "public", "List", "<", "SubscriptionDescription", ">", "getSubscriptions", "(", "String", "topicName", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncClient", ".", "getSubscript...
Retrieves the list of subscriptions for a given topic in the namespace. @param topicName - The name of the topic. @return the first 100 subscriptions. @throws TimeoutException - The operation times out. The timeout period is initiated through ClientSettings.operationTimeout @throws AuthorizationFailedException - No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details. @throws ServerBusyException - The server is busy. You should wait before you retry the operation. @throws ServiceBusException - An internal error or an unexpected exception occurred. @throws InterruptedException if the current thread was interrupted
[ "Retrieves", "the", "list", "of", "subscriptions", "for", "a", "given", "topic", "in", "the", "namespace", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L224-L226
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.updateQueue
public QueueDescription updateQueue(QueueDescription queueDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateQueueAsync(queueDescription)); }
java
public QueueDescription updateQueue(QueueDescription queueDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateQueueAsync(queueDescription)); }
[ "public", "QueueDescription", "updateQueue", "(", "QueueDescription", "queueDescription", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncClient", ".", "updateQueueAsync", "(", "qu...
Updates an existing queue. @param queueDescription - A {@link QueueDescription} object describing the attributes with which the queue will be updated. @return {@link QueueDescription} of the updated queue. @throws MessagingEntityNotFoundException - Described entity was not found. @throws IllegalArgumentException - descriptor is null. @throws TimeoutException - The operation times out. The timeout period is initiated through ClientSettings.operationTimeout @throws AuthorizationFailedException - No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details. @throws ServerBusyException - The server is busy. You should wait before you retry the operation. @throws ServiceBusException - An internal error or an unexpected exception occurred. @throws QuotaExceededException - Either the specified size in the description is not supported or the maximum allowed quota has been reached. @throws InterruptedException if the current thread was interrupted
[ "Updates", "an", "existing", "queue", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L328-L330
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.updateTopic
public TopicDescription updateTopic(TopicDescription topicDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateTopicAsync(topicDescription)); }
java
public TopicDescription updateTopic(TopicDescription topicDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateTopicAsync(topicDescription)); }
[ "public", "TopicDescription", "updateTopic", "(", "TopicDescription", "topicDescription", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncClient", ".", "updateTopicAsync", "(", "to...
Updates an existing topic. @param topicDescription - A {@link TopicDescription} object describing the attributes with which the topic will be updated. @return {@link TopicDescription} of the updated topic. @throws MessagingEntityNotFoundException - Described entity was not found. @throws IllegalArgumentException - descriptor is null. @throws TimeoutException - The operation times out. The timeout period is initiated through ClientSettings.operationTimeout @throws AuthorizationFailedException - No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details. @throws ServerBusyException - The server is busy. You should wait before you retry the operation. @throws ServiceBusException - An internal error or an unexpected exception occurred. @throws QuotaExceededException - Either the specified size in the description is not supported or the maximum allowed quota has been reached. @throws InterruptedException if the current thread was interrupted
[ "Updates", "an", "existing", "topic", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L380-L382
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.updateSubscription
public SubscriptionDescription updateSubscription(SubscriptionDescription subscriptionDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateSubscriptionAsync(subscriptionDescription)); }
java
public SubscriptionDescription updateSubscription(SubscriptionDescription subscriptionDescription) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.updateSubscriptionAsync(subscriptionDescription)); }
[ "public", "SubscriptionDescription", "updateSubscription", "(", "SubscriptionDescription", "subscriptionDescription", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncClient", ".", "upd...
Updates an existing subscription. @param subscriptionDescription - A {@link SubscriptionDescription} object describing the attributes with which the subscription will be updated. @return {@link SubscriptionDescription} of the updated subscription. @throws MessagingEntityNotFoundException - Described entity was not found. @throws IllegalArgumentException - descriptor is null. @throws TimeoutException - The operation times out. The timeout period is initiated through ClientSettings.operationTimeout @throws AuthorizationFailedException - No sufficient permission to perform this operation. Please check ClientSettings.tokenProvider has correct details. @throws ServerBusyException - The server is busy. You should wait before you retry the operation. @throws ServiceBusException - An internal error or an unexpected exception occurred. @throws QuotaExceededException - Either the specified size in the description is not supported or the maximum allowed quota has been reached. @throws InterruptedException if the current thread was interrupted
[ "Updates", "an", "existing", "subscription", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L451-L453
train
Azure/azure-sdk-for-java
applicationconfig/client/src/samples/java/HelloWorld.java
HelloWorld.main
public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException { // The connection string value can be obtained by going to your App Configuration instance in the Azure portal // and navigating to "Access Keys" page under the "Settings" section. String connectionString = "endpoint={endpoint_value};id={id_value};name={secret_value}"; // Instantiate a client that will be used to call the service. ConfigurationAsyncClient client = ConfigurationAsyncClient.builder() .credentials(new ConfigurationClientCredentials(connectionString)) .build(); // Name of the key to add to the configuration service. String key = "hello"; // setSetting adds or updates a setting to Azure Application Configuration store. Alternatively, you can call // addSetting which only succeeds if the setting does not exist in the store. Or, you can call updateSetting to // update a setting that is already present in the store. // We subscribe and wait for the service call to complete then print out the contents of our newly added setting. // If an error occurs, we print out that error. On completion of the subscription, we delete the setting. // .block() exists there so the program does not end before the deletion has completed. client.setSetting(key, "world").subscribe( result -> { ConfigurationSetting setting = result.value(); System.out.println(String.format("Key: %s, Value: %s", setting.key(), setting.value())); }, error -> System.err.println("There was an error adding the setting: " + error.toString()), () -> { System.out.println("Completed. Deleting setting..."); client.deleteSetting(key).block(); }); }
java
public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException { // The connection string value can be obtained by going to your App Configuration instance in the Azure portal // and navigating to "Access Keys" page under the "Settings" section. String connectionString = "endpoint={endpoint_value};id={id_value};name={secret_value}"; // Instantiate a client that will be used to call the service. ConfigurationAsyncClient client = ConfigurationAsyncClient.builder() .credentials(new ConfigurationClientCredentials(connectionString)) .build(); // Name of the key to add to the configuration service. String key = "hello"; // setSetting adds or updates a setting to Azure Application Configuration store. Alternatively, you can call // addSetting which only succeeds if the setting does not exist in the store. Or, you can call updateSetting to // update a setting that is already present in the store. // We subscribe and wait for the service call to complete then print out the contents of our newly added setting. // If an error occurs, we print out that error. On completion of the subscription, we delete the setting. // .block() exists there so the program does not end before the deletion has completed. client.setSetting(key, "world").subscribe( result -> { ConfigurationSetting setting = result.value(); System.out.println(String.format("Key: %s, Value: %s", setting.key(), setting.value())); }, error -> System.err.println("There was an error adding the setting: " + error.toString()), () -> { System.out.println("Completed. Deleting setting..."); client.deleteSetting(key).block(); }); }
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", "{", "// The connection string value can be obtained by going to your App Configuration instance in the Azure portal", "// and navigating to \"A...
Runs the sample algorithm and demonstrates how to add, get, and delete a configuration setting. @param args Unused. Arguments to the program. @throws NoSuchAlgorithmException when credentials cannot be created because the service cannot resolve the HMAC-SHA256 algorithm. @throws InvalidKeyException when credentials cannot be created because the connection string is invalid.
[ "Runs", "the", "sample", "algorithm", "and", "demonstrates", "how", "to", "add", "get", "and", "delete", "a", "configuration", "setting", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationconfig/client/src/samples/java/HelloWorld.java#L23-L52
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java
Locator.create
public static Creator create(String accessPolicyId, String assetId, LocatorType locatorType) { return new Creator(accessPolicyId, assetId, locatorType); }
java
public static Creator create(String accessPolicyId, String assetId, LocatorType locatorType) { return new Creator(accessPolicyId, assetId, locatorType); }
[ "public", "static", "Creator", "create", "(", "String", "accessPolicyId", ",", "String", "assetId", ",", "LocatorType", "locatorType", ")", "{", "return", "new", "Creator", "(", "accessPolicyId", ",", "assetId", ",", "locatorType", ")", ";", "}" ]
Create an operation to create a new locator entity. @param accessPolicyId id of access policy for locator @param assetId id of asset for locator @param locatorType locator type @return the operation
[ "Create", "an", "operation", "to", "create", "a", "new", "locator", "entity", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java#L57-L60
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java
Locator.get
public static EntityGetOperation<LocatorInfo> get(String locatorId) { return new DefaultGetOperation<LocatorInfo>(ENTITY_SET, locatorId, LocatorInfo.class); }
java
public static EntityGetOperation<LocatorInfo> get(String locatorId) { return new DefaultGetOperation<LocatorInfo>(ENTITY_SET, locatorId, LocatorInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "LocatorInfo", ">", "get", "(", "String", "locatorId", ")", "{", "return", "new", "DefaultGetOperation", "<", "LocatorInfo", ">", "(", "ENTITY_SET", ",", "locatorId", ",", "LocatorInfo", ".", "class", ")", ";", "}...
Create an operation to get the given locator. @param locatorId id of locator to retrieve @return the get operation
[ "Create", "an", "operation", "to", "get", "the", "given", "locator", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java#L195-L198
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java
Locator.list
public static DefaultListOperation<LocatorInfo> list( LinkInfo<LocatorInfo> link) { return new DefaultListOperation<LocatorInfo>(link.getHref(), new GenericType<ListResult<LocatorInfo>>() { }); }
java
public static DefaultListOperation<LocatorInfo> list( LinkInfo<LocatorInfo> link) { return new DefaultListOperation<LocatorInfo>(link.getHref(), new GenericType<ListResult<LocatorInfo>>() { }); }
[ "public", "static", "DefaultListOperation", "<", "LocatorInfo", ">", "list", "(", "LinkInfo", "<", "LocatorInfo", ">", "link", ")", "{", "return", "new", "DefaultListOperation", "<", "LocatorInfo", ">", "(", "link", ".", "getHref", "(", ")", ",", "new", "Gen...
Create an operation that will list all the locators at the given link. @param link Link to request locators from. @return The list operation.
[ "Create", "an", "operation", "that", "will", "list", "all", "the", "locators", "at", "the", "given", "link", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/Locator.java#L218-L223
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java
MediaConfiguration.configureWithAzureAdTokenProvider
public static Configuration configureWithAzureAdTokenProvider( URI apiServer, TokenProvider azureAdTokenProvider) { return configureWithAzureAdTokenProvider(Configuration.getInstance(), apiServer, azureAdTokenProvider); }
java
public static Configuration configureWithAzureAdTokenProvider( URI apiServer, TokenProvider azureAdTokenProvider) { return configureWithAzureAdTokenProvider(Configuration.getInstance(), apiServer, azureAdTokenProvider); }
[ "public", "static", "Configuration", "configureWithAzureAdTokenProvider", "(", "URI", "apiServer", ",", "TokenProvider", "azureAdTokenProvider", ")", "{", "return", "configureWithAzureAdTokenProvider", "(", "Configuration", ".", "getInstance", "(", ")", ",", "apiServer", ...
Returns the default Configuration provisioned for the specified AMS account and token provider. @param apiServer the AMS account uri @param azureAdTokenProvider the token provider @return a Configuration
[ "Returns", "the", "default", "Configuration", "provisioned", "for", "the", "specified", "AMS", "account", "and", "token", "provider", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java#L47-L52
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java
MediaConfiguration.configureWithAzureAdTokenProvider
public static Configuration configureWithAzureAdTokenProvider( Configuration configuration, URI apiServer, TokenProvider azureAdTokenProvider) { configuration.setProperty(AZURE_AD_API_SERVER, apiServer.toString()); configuration.setProperty(AZURE_AD_TOKEN_PROVIDER, azureAdTokenProvider); return configuration; }
java
public static Configuration configureWithAzureAdTokenProvider( Configuration configuration, URI apiServer, TokenProvider azureAdTokenProvider) { configuration.setProperty(AZURE_AD_API_SERVER, apiServer.toString()); configuration.setProperty(AZURE_AD_TOKEN_PROVIDER, azureAdTokenProvider); return configuration; }
[ "public", "static", "Configuration", "configureWithAzureAdTokenProvider", "(", "Configuration", "configuration", ",", "URI", "apiServer", ",", "TokenProvider", "azureAdTokenProvider", ")", "{", "configuration", ".", "setProperty", "(", "AZURE_AD_API_SERVER", ",", "apiServer...
Setup a Configuration with specified Configuration, AMS account and token provider @param configuration The target configuration @param apiServer the AMS account uri @param azureAdTokenProvider the token provider @return the target Configuration
[ "Setup", "a", "Configuration", "with", "specified", "Configuration", "AMS", "account", "and", "token", "provider" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/MediaConfiguration.java#L61-L70
train
Azure/azure-sdk-for-java
common/azure-common-auth/src/main/java/com/azure/common/auth/credentials/AzureCliCredentials.java
AzureCliCredentials.create
public static AzureCliCredentials create() throws IOException { return create( Paths.get(System.getProperty("user.home"), ".azure", "azureProfile.json").toFile(), Paths.get(System.getProperty("user.home"), ".azure", "accessTokens.json").toFile()); }
java
public static AzureCliCredentials create() throws IOException { return create( Paths.get(System.getProperty("user.home"), ".azure", "azureProfile.json").toFile(), Paths.get(System.getProperty("user.home"), ".azure", "accessTokens.json").toFile()); }
[ "public", "static", "AzureCliCredentials", "create", "(", ")", "throws", "IOException", "{", "return", "create", "(", "Paths", ".", "get", "(", "System", ".", "getProperty", "(", "\"user.home\"", ")", ",", "\".azure\"", ",", "\"azureProfile.json\"", ")", ".", ...
Creates an instance of AzureCliCredentials with the default Azure CLI configuration. @return an instance of AzureCliCredentials @throws IOException if the Azure CLI token files are not accessible
[ "Creates", "an", "instance", "of", "AzureCliCredentials", "with", "the", "default", "Azure", "CLI", "configuration", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common-auth/src/main/java/com/azure/common/auth/credentials/AzureCliCredentials.java#L76-L80
train
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java
ExtendedServerBlobAuditingPoliciesInner.getAsync
public Observable<ExtendedServerBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ExtendedServerBlobAuditingPolicyInner>, ExtendedServerBlobAuditingPolicyInner>() { @Override public ExtendedServerBlobAuditingPolicyInner call(ServiceResponse<ExtendedServerBlobAuditingPolicyInner> response) { return response.body(); } }); }
java
public Observable<ExtendedServerBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ExtendedServerBlobAuditingPolicyInner>, ExtendedServerBlobAuditingPolicyInner>() { @Override public ExtendedServerBlobAuditingPolicyInner call(ServiceResponse<ExtendedServerBlobAuditingPolicyInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "ExtendedServerBlobAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", ...
Gets an extended server's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ExtendedServerBlobAuditingPolicyInner object
[ "Gets", "an", "extended", "server", "s", "blob", "auditing", "policy", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java#L106-L113
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/util/ExpandableStringEnum.java
ExpandableStringEnum.fromString
@SuppressWarnings("unchecked") protected static <T extends ExpandableStringEnum<T>> T fromString(String name, Class<T> clazz) { if (name == null) { return null; } else if (valuesByName != null) { T value = (T) valuesByName.get(uniqueKey(clazz, name)); if (value != null) { return value; } } try { T value = clazz.newInstance(); return value.withNameValue(name, value, clazz); } catch (InstantiationException | IllegalAccessException e) { return null; } }
java
@SuppressWarnings("unchecked") protected static <T extends ExpandableStringEnum<T>> T fromString(String name, Class<T> clazz) { if (name == null) { return null; } else if (valuesByName != null) { T value = (T) valuesByName.get(uniqueKey(clazz, name)); if (value != null) { return value; } } try { T value = clazz.newInstance(); return value.withNameValue(name, value, clazz); } catch (InstantiationException | IllegalAccessException e) { return null; } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "static", "<", "T", "extends", "ExpandableStringEnum", "<", "T", ">", ">", "T", "fromString", "(", "String", "name", ",", "Class", "<", "T", ">", "clazz", ")", "{", "if", "(", "name", "==",...
Creates an instance of the specific expandable string enum from a String. @param name the value to create the instance from @param clazz the class of the expandable string enum @param <T> the class of the expandable string enum @return the expandable string enum instance
[ "Creates", "an", "instance", "of", "the", "specific", "expandable", "string", "enum", "from", "a", "String", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/util/ExpandableStringEnum.java#L48-L65
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/util/ExpandableStringEnum.java
ExpandableStringEnum.values
@SuppressWarnings("unchecked") protected static <T extends ExpandableStringEnum<T>> Collection<T> values(Class<T> clazz) { // Make a copy of all values Collection<? extends ExpandableStringEnum<?>> values = new ArrayList<>(valuesByName.values()); Collection<T> list = new HashSet<T>(); for (ExpandableStringEnum<?> value : values) { if (value.getClass().isAssignableFrom(clazz)) { list.add((T) value); } } return list; }
java
@SuppressWarnings("unchecked") protected static <T extends ExpandableStringEnum<T>> Collection<T> values(Class<T> clazz) { // Make a copy of all values Collection<? extends ExpandableStringEnum<?>> values = new ArrayList<>(valuesByName.values()); Collection<T> list = new HashSet<T>(); for (ExpandableStringEnum<?> value : values) { if (value.getClass().isAssignableFrom(clazz)) { list.add((T) value); } } return list; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "static", "<", "T", "extends", "ExpandableStringEnum", "<", "T", ">", ">", "Collection", "<", "T", ">", "values", "(", "Class", "<", "T", ">", "clazz", ")", "{", "// Make a copy of all values", ...
Gets a collection of all known values to an expandable string enum type. @param clazz the class of the expandable string enum @param <T> the class of the expandable string enum @return a collection of all known values
[ "Gets", "a", "collection", "of", "all", "known", "values", "to", "an", "expandable", "string", "enum", "type", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/util/ExpandableStringEnum.java#L73-L86
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java
NotificationEndPoint.create
public static EntityCreateOperation<NotificationEndPointInfo> create( String name, EndPointType endPointType, String endPointAddress) { return new Creator(name, endPointType, endPointAddress); }
java
public static EntityCreateOperation<NotificationEndPointInfo> create( String name, EndPointType endPointType, String endPointAddress) { return new Creator(name, endPointType, endPointAddress); }
[ "public", "static", "EntityCreateOperation", "<", "NotificationEndPointInfo", ">", "create", "(", "String", "name", ",", "EndPointType", "endPointType", ",", "String", "endPointAddress", ")", "{", "return", "new", "Creator", "(", "name", ",", "endPointType", ",", ...
Creates an operation to create a new notification end point. @param name name of the notification end point. @param endPointType the type of the notification end point. @param endPointAddress the address of the end point. @return The operation
[ "Creates", "an", "operation", "to", "create", "a", "new", "notification", "end", "point", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java#L52-L55
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java
NotificationEndPoint.get
public static EntityGetOperation<NotificationEndPointInfo> get( String notificationEndPointId) { return new DefaultGetOperation<NotificationEndPointInfo>(ENTITY_SET, notificationEndPointId, NotificationEndPointInfo.class); }
java
public static EntityGetOperation<NotificationEndPointInfo> get( String notificationEndPointId) { return new DefaultGetOperation<NotificationEndPointInfo>(ENTITY_SET, notificationEndPointId, NotificationEndPointInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "NotificationEndPointInfo", ">", "get", "(", "String", "notificationEndPointId", ")", "{", "return", "new", "DefaultGetOperation", "<", "NotificationEndPointInfo", ">", "(", "ENTITY_SET", ",", "notificationEndPointId", ",", ...
Create an operation that will retrieve the given notification end point @param notificationEndPointId id of notification end point to retrieve @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "given", "notification", "end", "point" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java#L89-L93
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java
NotificationEndPoint.get
public static EntityGetOperation<NotificationEndPointInfo> get( LinkInfo<NotificationEndPointInfo> link) { return new DefaultGetOperation<NotificationEndPointInfo>( link.getHref(), NotificationEndPointInfo.class); }
java
public static EntityGetOperation<NotificationEndPointInfo> get( LinkInfo<NotificationEndPointInfo> link) { return new DefaultGetOperation<NotificationEndPointInfo>( link.getHref(), NotificationEndPointInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "NotificationEndPointInfo", ">", "get", "(", "LinkInfo", "<", "NotificationEndPointInfo", ">", "link", ")", "{", "return", "new", "DefaultGetOperation", "<", "NotificationEndPointInfo", ">", "(", "link", ".", "getHref", ...
Create an operation that will retrieve the notification end point at the given link @param link the link @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "notification", "end", "point", "at", "the", "given", "link" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/NotificationEndPoint.java#L103-L107
train
Azure/azure-sdk-for-java
recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/ReplicationUsagesInner.java
ReplicationUsagesInner.listAsync
public Observable<List<ReplicationUsageInner>> listAsync(String resourceGroupName, String vaultName) { return listWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1<ServiceResponse<List<ReplicationUsageInner>>, List<ReplicationUsageInner>>() { @Override public List<ReplicationUsageInner> call(ServiceResponse<List<ReplicationUsageInner>> response) { return response.body(); } }); }
java
public Observable<List<ReplicationUsageInner>> listAsync(String resourceGroupName, String vaultName) { return listWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1<ServiceResponse<List<ReplicationUsageInner>>, List<ReplicationUsageInner>>() { @Override public List<ReplicationUsageInner> call(ServiceResponse<List<ReplicationUsageInner>> response) { return response.body(); } }); }
[ "public", "Observable", "<", "List", "<", "ReplicationUsageInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "vaultName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "vaultName", ")", ".", "map",...
Fetches the replication usages of the vault. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;ReplicationUsageInner&gt; object
[ "Fetches", "the", "replication", "usages", "of", "the", "vault", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/ReplicationUsagesInner.java#L96-L103
train
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.delete
public void delete(String resourceGroupName, String labAccountName) { deleteWithServiceResponseAsync(resourceGroupName, labAccountName).toBlocking().last().body(); }
java
public void delete(String resourceGroupName, String labAccountName) { deleteWithServiceResponseAsync(resourceGroupName, labAccountName).toBlocking().last().body(); }
[ "public", "void", "delete", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ")", "{", "deleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ")", ".", "toBlocking", "(", ")", ".", "last", "(", ")", ".", "body", "(...
Delete lab account. This operation can take a while to complete. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @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
[ "Delete", "lab", "account", ".", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L869-L871
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java
JobType.addJobNotificationSubscriptionType
public JobType addJobNotificationSubscriptionType( JobNotificationSubscriptionType jobNotificationSubscription) { if (this.jobNotificationSubscriptionTypes == null) { this.jobNotificationSubscriptionTypes = new ArrayList<JobNotificationSubscriptionType>(); } this.jobNotificationSubscriptionTypes.add(jobNotificationSubscription); return this; }
java
public JobType addJobNotificationSubscriptionType( JobNotificationSubscriptionType jobNotificationSubscription) { if (this.jobNotificationSubscriptionTypes == null) { this.jobNotificationSubscriptionTypes = new ArrayList<JobNotificationSubscriptionType>(); } this.jobNotificationSubscriptionTypes.add(jobNotificationSubscription); return this; }
[ "public", "JobType", "addJobNotificationSubscriptionType", "(", "JobNotificationSubscriptionType", "jobNotificationSubscription", ")", "{", "if", "(", "this", ".", "jobNotificationSubscriptionTypes", "==", "null", ")", "{", "this", ".", "jobNotificationSubscriptionTypes", "="...
Adds the job notification subscription type. @param jobNotificationSubscription the job notification subscription @return the job type
[ "Adds", "the", "job", "notification", "subscription", "type", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/content/JobType.java#L306-L313
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/EntityNameHelper.java
EntityNameHelper.formatSubscriptionPath
public static String formatSubscriptionPath(String topicPath, String subscriptionName) { return String.join(pathDelimiter, topicPath, subscriptionsSubPath, subscriptionName); }
java
public static String formatSubscriptionPath(String topicPath, String subscriptionName) { return String.join(pathDelimiter, topicPath, subscriptionsSubPath, subscriptionName); }
[ "public", "static", "String", "formatSubscriptionPath", "(", "String", "topicPath", ",", "String", "subscriptionName", ")", "{", "return", "String", ".", "join", "(", "pathDelimiter", ",", "topicPath", ",", "subscriptionsSubPath", ",", "subscriptionName", ")", ";", ...
Formats the subscription path, based on the topic path and subscription name. @param topicPath - The name of the topic, including slashes. @param subscriptionName - The name of the subscription. @return The path of the subscription.
[ "Formats", "the", "subscription", "path", "based", "on", "the", "topic", "path", "and", "subscription", "name", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/EntityNameHelper.java#L31-L33
train
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/EntityNameHelper.java
EntityNameHelper.formatRulePath
public static String formatRulePath(String topicPath, String subscriptionName, String ruleName) { return String.join(pathDelimiter, topicPath, subscriptionsSubPath, subscriptionName, rulesSubPath, ruleName); }
java
public static String formatRulePath(String topicPath, String subscriptionName, String ruleName) { return String.join(pathDelimiter, topicPath, subscriptionsSubPath, subscriptionName, rulesSubPath, ruleName); }
[ "public", "static", "String", "formatRulePath", "(", "String", "topicPath", ",", "String", "subscriptionName", ",", "String", "ruleName", ")", "{", "return", "String", ".", "join", "(", "pathDelimiter", ",", "topicPath", ",", "subscriptionsSubPath", ",", "subscrip...
Formats the rule path, based on the topic path, subscription name and the rule name. @param topicPath - The name of the topic, including slashes. @param subscriptionName - The name of the subscription. @param ruleName - The name of the rule. @return The path of the rule
[ "Formats", "the", "rule", "path", "based", "on", "the", "topic", "path", "subscription", "name", "and", "the", "rule", "name", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/EntityNameHelper.java#L42-L49
train
Azure/azure-sdk-for-java
applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java
ConfigurationClient.addSetting
public Response<ConfigurationSetting> addSetting(String key, String value) { return addSetting(new ConfigurationSetting().key(key).value(value)); }
java
public Response<ConfigurationSetting> addSetting(String key, String value) { return addSetting(new ConfigurationSetting().key(key).value(value)); }
[ "public", "Response", "<", "ConfigurationSetting", ">", "addSetting", "(", "String", "key", ",", "String", "value", ")", "{", "return", "addSetting", "(", "new", "ConfigurationSetting", "(", ")", ".", "key", "(", "key", ")", ".", "value", "(", "value", ")"...
Adds a configuration value in the service if that key does not exist. <p><strong>Code Samples</strong></p> <pre> ConfigurationSetting result = client.addSetting("prodDBConnection", "db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value());</pre> @param key The key of the configuration setting to add. @param value The value associated with this configuration setting key. @return The {@link ConfigurationSetting} that was created, or {@code null}, if a key collision occurs or the key is an invalid value (which will also throw ServiceRequestException described below). @throws IllegalArgumentException If {@code key} is {@code null}. @throws ServiceRequestException If a ConfigurationSetting with the same key exists. Or, {@code key} is an empty string.
[ "Adds", "a", "configuration", "value", "in", "the", "service", "if", "that", "key", "does", "not", "exist", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java#L70-L72
train
Azure/azure-sdk-for-java
applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java
ConfigurationClient.setSetting
public Response<ConfigurationSetting> setSetting(String key, String value) { return setSetting(new ConfigurationSetting().key(key).value(value)); }
java
public Response<ConfigurationSetting> setSetting(String key, String value) { return setSetting(new ConfigurationSetting().key(key).value(value)); }
[ "public", "Response", "<", "ConfigurationSetting", ">", "setSetting", "(", "String", "key", ",", "String", "value", ")", "{", "return", "setSetting", "(", "new", "ConfigurationSetting", "(", ")", ".", "key", "(", "key", ")", ".", "value", "(", "value", ")"...
Creates or updates a configuration value in the service with the given key. <p><strong>Code Samples</strong></p> <pre> ConfigurationSetting result = client.setSetting('prodDBConnection", "db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value()); result = client.setSetting("prodDBConnection", "updated_db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value());</pre> @param key The key of the configuration setting to create or update. @param value The value of this configuration setting. @return The {@link ConfigurationSetting} that was created or updated, or {@code null}, if the key is an invalid value (which will also throw ServiceRequestException described below). @throws IllegalArgumentException If {@code key} is {@code null}. @throws ServiceRequestException If the setting exists and is locked. Or, if {@code key} is an empty string.
[ "Creates", "or", "updates", "a", "configuration", "value", "in", "the", "service", "with", "the", "given", "key", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java#L119-L121
train
Azure/azure-sdk-for-java
applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java
ConfigurationClient.updateSetting
public Response<ConfigurationSetting> updateSetting(String key, String value) { return updateSetting(new ConfigurationSetting().key(key).value(value)); }
java
public Response<ConfigurationSetting> updateSetting(String key, String value) { return updateSetting(new ConfigurationSetting().key(key).value(value)); }
[ "public", "Response", "<", "ConfigurationSetting", ">", "updateSetting", "(", "String", "key", ",", "String", "value", ")", "{", "return", "updateSetting", "(", "new", "ConfigurationSetting", "(", ")", ".", "key", "(", "key", ")", ".", "value", "(", "value",...
Updates an existing configuration value in the service with the given key. The setting must already exist. <p><strong>Code Samples</strong></p> <pre> ConfigurationSetting result = client.updateSetting("prodDCConnection", "db_connection"); System.out.printf("Key: %s, Value: %s", result.key(), result.value());</pre> @param key The key of the configuration setting to update. @param value The updated value of this configuration setting. @return The {@link ConfigurationSetting} that was updated, or {@code null}, if the configuration value does not exist, is locked, or the key is an invalid value (which will also throw ServiceRequestException described below). @throws IllegalArgumentException If {@code key} is {@code null}. @throws ServiceRequestException If a ConfigurationSetting with the key does not exist or the configuration value is locked. Or, if {@code key} is an empty string.
[ "Updates", "an", "existing", "configuration", "value", "in", "the", "service", "with", "the", "given", "key", ".", "The", "setting", "must", "already", "exist", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationconfig/client/src/main/java/com/azure/applicationconfig/ConfigurationClient.java#L176-L178
train
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobCredentialsInner.java
JobCredentialsInner.delete
public void delete(String resourceGroupName, String serverName, String jobAgentName, String credentialName) { deleteWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName).toBlocking().single().body(); }
java
public void delete(String resourceGroupName, String serverName, String jobAgentName, String credentialName) { deleteWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, credentialName).toBlocking().single().body(); }
[ "public", "void", "delete", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "credentialName", ")", "{", "deleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "jobAgentName", "...
Deletes a job credential. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param credentialName The name of the credential. @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
[ "Deletes", "a", "job", "credential", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobCredentialsInner.java#L437-L439
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/StorageRestoreParameters.java
StorageRestoreParameters.withStorageBundleBackup
public StorageRestoreParameters withStorageBundleBackup(byte[] storageBundleBackup) { if (storageBundleBackup == null) { this.storageBundleBackup = null; } else { this.storageBundleBackup = Base64Url.encode(storageBundleBackup); } return this; }
java
public StorageRestoreParameters withStorageBundleBackup(byte[] storageBundleBackup) { if (storageBundleBackup == null) { this.storageBundleBackup = null; } else { this.storageBundleBackup = Base64Url.encode(storageBundleBackup); } return this; }
[ "public", "StorageRestoreParameters", "withStorageBundleBackup", "(", "byte", "[", "]", "storageBundleBackup", ")", "{", "if", "(", "storageBundleBackup", "==", "null", ")", "{", "this", ".", "storageBundleBackup", "=", "null", ";", "}", "else", "{", "this", "."...
Set the storageBundleBackup value. @param storageBundleBackup the storageBundleBackup value to set @return the StorageRestoreParameters object itself.
[ "Set", "the", "storageBundleBackup", "value", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/StorageRestoreParameters.java#L38-L45
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java
ODataEntity.getLink
public <U extends ODataEntity<?>> LinkInfo<U> getLink(String rel) { for (Object child : entry.getEntryChildren()) { LinkType link = linkFromChild(child); if (link != null && link.getRel().equals(rel)) { return new LinkInfo<U>(link); } } return null; }
java
public <U extends ODataEntity<?>> LinkInfo<U> getLink(String rel) { for (Object child : entry.getEntryChildren()) { LinkType link = linkFromChild(child); if (link != null && link.getRel().equals(rel)) { return new LinkInfo<U>(link); } } return null; }
[ "public", "<", "U", "extends", "ODataEntity", "<", "?", ">", ">", "LinkInfo", "<", "U", ">", "getLink", "(", "String", "rel", ")", "{", "for", "(", "Object", "child", ":", "entry", ".", "getEntryChildren", "(", ")", ")", "{", "LinkType", "link", "=",...
Get the link with the given rel attribute @param rel rel of link to retrieve @return The link if found, null if not.
[ "Get", "the", "link", "with", "the", "given", "rel", "attribute" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java#L91-L100
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java
ODataEntity.getRelationLink
public <U extends ODataEntity<?>> LinkInfo<U> getRelationLink( String relationName) { return this.<U> getLink(Constants.ODATA_DATA_NS + "/related/" + relationName); }
java
public <U extends ODataEntity<?>> LinkInfo<U> getRelationLink( String relationName) { return this.<U> getLink(Constants.ODATA_DATA_NS + "/related/" + relationName); }
[ "public", "<", "U", "extends", "ODataEntity", "<", "?", ">", ">", "LinkInfo", "<", "U", ">", "getRelationLink", "(", "String", "relationName", ")", "{", "return", "this", ".", "<", "U", ">", "getLink", "(", "Constants", ".", "ODATA_DATA_NS", "+", "\"/rel...
Get the link to navigate an OData relationship @param relationName name of the OData relationship @return the link if found, null if not.
[ "Get", "the", "link", "to", "navigate", "an", "OData", "relationship" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java#L109-L113
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java
ODataEntity.isODataEntityCollectionType
public static boolean isODataEntityCollectionType(Class<?> type, Type genericType) { if (ListResult.class != type) { return false; } ParameterizedType pt = (ParameterizedType) genericType; if (pt.getActualTypeArguments().length != 1) { return false; } Class<?> typeClass = getCollectedType(genericType); return isODataEntityType(typeClass); }
java
public static boolean isODataEntityCollectionType(Class<?> type, Type genericType) { if (ListResult.class != type) { return false; } ParameterizedType pt = (ParameterizedType) genericType; if (pt.getActualTypeArguments().length != 1) { return false; } Class<?> typeClass = getCollectedType(genericType); return isODataEntityType(typeClass); }
[ "public", "static", "boolean", "isODataEntityCollectionType", "(", "Class", "<", "?", ">", "type", ",", "Type", "genericType", ")", "{", "if", "(", "ListResult", ".", "class", "!=", "type", ")", "{", "return", "false", ";", "}", "ParameterizedType", "pt", ...
Is the given type a collection of ODataEntity @param type Base type @param genericType Generic type @return true if it's List&lt;OEntity> or derive from.
[ "Is", "the", "given", "type", "a", "collection", "of", "ODataEntity" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataEntity.java#L151-L166
train
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteConnectionsInner.java
ExpressRouteConnectionsInner.beginDelete
public void beginDelete(String resourceGroupName, String expressRouteGatewayName, String connectionName) { beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).toBlocking().single().body(); }
java
public void beginDelete(String resourceGroupName, String expressRouteGatewayName, String connectionName) { beginDeleteWithServiceResponseAsync(resourceGroupName, expressRouteGatewayName, connectionName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "expressRouteGatewayName", ",", "String", "connectionName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "expressRouteGatewayName", ",", "connectionName", ...
Deletes a connection to a ExpressRoute circuit. @param resourceGroupName The name of the resource group. @param expressRouteGatewayName The name of the ExpressRoute gateway. @param connectionName The name of the connection subresource. @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
[ "Deletes", "a", "connection", "to", "a", "ExpressRoute", "circuit", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteConnectionsInner.java#L440-L442
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/Strings.java
Strings.isNullOrWhiteSpace
public static boolean isNullOrWhiteSpace(String arg) { if (Strings.isNullOrEmpty(arg) || arg.trim().isEmpty()) { return true; } return false; }
java
public static boolean isNullOrWhiteSpace(String arg) { if (Strings.isNullOrEmpty(arg) || arg.trim().isEmpty()) { return true; } return false; }
[ "public", "static", "boolean", "isNullOrWhiteSpace", "(", "String", "arg", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "arg", ")", "||", "arg", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", "true", ";", "}", "ret...
Determines whether the parameter string is null, empty or whitespace. @param arg The string to be checked. @return true if the string is null, empty or whitespace.
[ "Determines", "whether", "the", "parameter", "string", "is", "null", "empty", "or", "whitespace", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/Strings.java#L29-L36
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/ByteExtensions.java
ByteExtensions.sequenceEqualConstantTime
public static boolean sequenceEqualConstantTime(byte[] self, byte[] other) { if (self == null) { throw new IllegalArgumentException("self"); } if (other == null) { throw new IllegalArgumentException("other"); } // Constant time comparison of two byte arrays long difference = (self.length & 0xffffffffL) ^ (other.length & 0xffffffffL); for (int i = 0; i < self.length && i < other.length; i++) { difference |= (self[i] ^ other[i]) & 0xffffffffL; } return difference == 0; }
java
public static boolean sequenceEqualConstantTime(byte[] self, byte[] other) { if (self == null) { throw new IllegalArgumentException("self"); } if (other == null) { throw new IllegalArgumentException("other"); } // Constant time comparison of two byte arrays long difference = (self.length & 0xffffffffL) ^ (other.length & 0xffffffffL); for (int i = 0; i < self.length && i < other.length; i++) { difference |= (self[i] ^ other[i]) & 0xffffffffL; } return difference == 0; }
[ "public", "static", "boolean", "sequenceEqualConstantTime", "(", "byte", "[", "]", "self", ",", "byte", "[", "]", "other", ")", "{", "if", "(", "self", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"self\"", ")", ";", "}", "i...
Compares two byte arrays in constant time. @param self The first byte array to compare @param other The second byte array to compare @return True if the two byte arrays are equal.
[ "Compares", "two", "byte", "arrays", "in", "constant", "time", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/ByteExtensions.java#L78-L95
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/KeyVerifyParameters.java
KeyVerifyParameters.withDigest
public KeyVerifyParameters withDigest(byte[] digest) { if (digest == null) { this.digest = null; } else { this.digest = Base64Url.encode(digest); } return this; }
java
public KeyVerifyParameters withDigest(byte[] digest) { if (digest == null) { this.digest = null; } else { this.digest = Base64Url.encode(digest); } return this; }
[ "public", "KeyVerifyParameters", "withDigest", "(", "byte", "[", "]", "digest", ")", "{", "if", "(", "digest", "==", "null", ")", "{", "this", ".", "digest", "=", "null", ";", "}", "else", "{", "this", ".", "digest", "=", "Base64Url", ".", "encode", ...
Set the digest value. @param digest the digest value to set @return the KeyVerifyParameters object itself.
[ "Set", "the", "digest", "value", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/KeyVerifyParameters.java#L74-L81
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/KeyVerifyParameters.java
KeyVerifyParameters.withSignature
public KeyVerifyParameters withSignature(byte[] signature) { if (signature == null) { this.signature = null; } else { this.signature = Base64Url.encode(signature); } return this; }
java
public KeyVerifyParameters withSignature(byte[] signature) { if (signature == null) { this.signature = null; } else { this.signature = Base64Url.encode(signature); } return this; }
[ "public", "KeyVerifyParameters", "withSignature", "(", "byte", "[", "]", "signature", ")", "{", "if", "(", "signature", "==", "null", ")", "{", "this", ".", "signature", "=", "null", ";", "}", "else", "{", "this", ".", "signature", "=", "Base64Url", ".",...
Set the signature value. @param signature the signature value to set @return the KeyVerifyParameters object itself.
[ "Set", "the", "signature", "value", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/KeyVerifyParameters.java#L101-L108
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java
KeyVaultClientImpl.deleteSecretAsync
public Observable<SecretBundle> deleteSecretAsync(String vaultBaseUrl, String secretName) { return deleteSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceResponse<SecretBundle> response) { return response.body(); } }); }
java
public Observable<SecretBundle> deleteSecretAsync(String vaultBaseUrl, String secretName) { return deleteSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceResponse<SecretBundle> response) { return response.body(); } }); }
[ "public", "Observable", "<", "SecretBundle", ">", "deleteSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ")", "{", "return", "deleteSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ")", ".", "map", "(", "new", "Func1...
Deletes a secret from a specified key vault. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param secretName The name of the secret. @return the observable to the SecretBundle object
[ "Deletes", "a", "secret", "from", "a", "specified", "key", "vault", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java#L2617-L2624
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java
KeyVaultClientImpl.getCertificatesSinglePageAsync
public Observable<ServiceResponse<Page<CertificateItem>>> getCertificatesSinglePageAsync(final String vaultBaseUrl, final Integer maxresults) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null."); } if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{vaultBaseUrl}", vaultBaseUrl); return service.getCertificates(maxresults, this.apiVersion(), this.acceptLanguage(), parameterizedHost, this.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<CertificateItem>>>>() { @Override public Observable<ServiceResponse<Page<CertificateItem>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<CertificateItem>> result = getCertificatesDelegate(response); return Observable.just(new ServiceResponse<Page<CertificateItem>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
java
public Observable<ServiceResponse<Page<CertificateItem>>> getCertificatesSinglePageAsync(final String vaultBaseUrl, final Integer maxresults) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null."); } if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{vaultBaseUrl}", vaultBaseUrl); return service.getCertificates(maxresults, this.apiVersion(), this.acceptLanguage(), parameterizedHost, this.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<CertificateItem>>>>() { @Override public Observable<ServiceResponse<Page<CertificateItem>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<CertificateItem>> result = getCertificatesDelegate(response); return Observable.just(new ServiceResponse<Page<CertificateItem>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "CertificateItem", ">", ">", ">", "getCertificatesSinglePageAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "if", "(", "vaultBaseUrl", "==", "null", ...
List certificates in a specified key vault. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. @return the PagedList&lt;CertificateItem&gt; object wrapped in {@link ServiceResponse} if successful.
[ "List", "certificates", "in", "a", "specified", "key", "vault", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java#L3558-L3578
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java
KeyVaultClientImpl.deleteCertificateAsync
public Observable<CertificateBundle> deleteCertificateAsync(String vaultBaseUrl, String certificateName) { return deleteCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundle>() { @Override public CertificateBundle call(ServiceResponse<CertificateBundle> response) { return response.body(); } }); }
java
public Observable<CertificateBundle> deleteCertificateAsync(String vaultBaseUrl, String certificateName) { return deleteCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundle>() { @Override public CertificateBundle call(ServiceResponse<CertificateBundle> response) { return response.body(); } }); }
[ "public", "Observable", "<", "CertificateBundle", ">", "deleteCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "deleteCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "map",...
Deletes a certificate from a specified key vault. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the certificate. @return the observable to the CertificateBundle object
[ "Deletes", "a", "certificate", "from", "a", "specified", "key", "vault", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java#L3617-L3624
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.scheme
public String scheme(Object[] swaggerMethodArguments) { final String substitutedHost = applySubstitutions(rawHost, hostSubstitutions, swaggerMethodArguments, UrlEscapers.PATH_ESCAPER); final String[] substitutedHostParts = substitutedHost.split("://"); return substitutedHostParts.length < 1 ? null : substitutedHostParts[0]; }
java
public String scheme(Object[] swaggerMethodArguments) { final String substitutedHost = applySubstitutions(rawHost, hostSubstitutions, swaggerMethodArguments, UrlEscapers.PATH_ESCAPER); final String[] substitutedHostParts = substitutedHost.split("://"); return substitutedHostParts.length < 1 ? null : substitutedHostParts[0]; }
[ "public", "String", "scheme", "(", "Object", "[", "]", "swaggerMethodArguments", ")", "{", "final", "String", "substitutedHost", "=", "applySubstitutions", "(", "rawHost", ",", "hostSubstitutions", ",", "swaggerMethodArguments", ",", "UrlEscapers", ".", "PATH_ESCAPER"...
Get the scheme to use for HTTP requests for this Swagger method. @param swaggerMethodArguments the arguments to use for scheme/host substitutions. @return the final host to use for HTTP requests for this Swagger method.
[ "Get", "the", "scheme", "to", "use", "for", "HTTP", "requests", "for", "this", "Swagger", "method", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L221-L225
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.path
public String path(Object[] methodArguments) { return applySubstitutions(relativePath, pathSubstitutions, methodArguments, UrlEscapers.PATH_ESCAPER); }
java
public String path(Object[] methodArguments) { return applySubstitutions(relativePath, pathSubstitutions, methodArguments, UrlEscapers.PATH_ESCAPER); }
[ "public", "String", "path", "(", "Object", "[", "]", "methodArguments", ")", "{", "return", "applySubstitutions", "(", "relativePath", ",", "pathSubstitutions", ",", "methodArguments", ",", "UrlEscapers", ".", "PATH_ESCAPER", ")", ";", "}" ]
Get the path that will be used to complete the Swagger method's request. @param methodArguments the method arguments to use with the path substitutions @return the path value with its placeholders replaced by the matching substitutions
[ "Get", "the", "path", "that", "will", "be", "used", "to", "complete", "the", "Swagger", "method", "s", "request", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L245-L247
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.encodedQueryParameters
public Iterable<EncodedParameter> encodedQueryParameters(Object[] swaggerMethodArguments) { final List<EncodedParameter> result = new ArrayList<>(); if (querySubstitutions != null) { final PercentEscaper escaper = UrlEscapers.QUERY_ESCAPER; for (Substitution querySubstitution : querySubstitutions) { final int parameterIndex = querySubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[querySubstitution.methodParameterIndex()]; String parameterValue = serialize(methodArgument); if (parameterValue != null) { if (querySubstitution.shouldEncode() && escaper != null) { parameterValue = escaper.escape(parameterValue); } result.add(new EncodedParameter(querySubstitution.urlParameterName(), parameterValue)); } } } } return result; }
java
public Iterable<EncodedParameter> encodedQueryParameters(Object[] swaggerMethodArguments) { final List<EncodedParameter> result = new ArrayList<>(); if (querySubstitutions != null) { final PercentEscaper escaper = UrlEscapers.QUERY_ESCAPER; for (Substitution querySubstitution : querySubstitutions) { final int parameterIndex = querySubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[querySubstitution.methodParameterIndex()]; String parameterValue = serialize(methodArgument); if (parameterValue != null) { if (querySubstitution.shouldEncode() && escaper != null) { parameterValue = escaper.escape(parameterValue); } result.add(new EncodedParameter(querySubstitution.urlParameterName(), parameterValue)); } } } } return result; }
[ "public", "Iterable", "<", "EncodedParameter", ">", "encodedQueryParameters", "(", "Object", "[", "]", "swaggerMethodArguments", ")", "{", "final", "List", "<", "EncodedParameter", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "queryS...
Get the encoded query parameters that have been added to this value based on the provided method arguments. @param swaggerMethodArguments the arguments that will be used to create the query parameters' values @return an Iterable with the encoded query parameters
[ "Get", "the", "encoded", "query", "parameters", "that", "have", "been", "added", "to", "this", "value", "based", "on", "the", "provided", "method", "arguments", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L257-L278
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.encodedFormParameters
public Iterable<EncodedParameter> encodedFormParameters(Object[] swaggerMethodArguments) { if (formSubstitutions == null) { return Collections.emptyList(); } final List<EncodedParameter> result = new ArrayList<>(); final PercentEscaper escaper = UrlEscapers.QUERY_ESCAPER; for (Substitution formSubstitution : formSubstitutions) { final int parameterIndex = formSubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[formSubstitution.methodParameterIndex()]; String parameterValue = serialize(methodArgument); if (parameterValue != null) { if (formSubstitution.shouldEncode() && escaper != null) { parameterValue = escaper.escape(parameterValue); } result.add(new EncodedParameter(formSubstitution.urlParameterName(), parameterValue)); } } } return result; }
java
public Iterable<EncodedParameter> encodedFormParameters(Object[] swaggerMethodArguments) { if (formSubstitutions == null) { return Collections.emptyList(); } final List<EncodedParameter> result = new ArrayList<>(); final PercentEscaper escaper = UrlEscapers.QUERY_ESCAPER; for (Substitution formSubstitution : formSubstitutions) { final int parameterIndex = formSubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[formSubstitution.methodParameterIndex()]; String parameterValue = serialize(methodArgument); if (parameterValue != null) { if (formSubstitution.shouldEncode() && escaper != null) { parameterValue = escaper.escape(parameterValue); } result.add(new EncodedParameter(formSubstitution.urlParameterName(), parameterValue)); } } } return result; }
[ "public", "Iterable", "<", "EncodedParameter", ">", "encodedFormParameters", "(", "Object", "[", "]", "swaggerMethodArguments", ")", "{", "if", "(", "formSubstitutions", "==", "null", ")", "{", "return", "Collections", ".", "emptyList", "(", ")", ";", "}", "fi...
Get the encoded form parameters that have been added to this value based on the provided method arguments. @param swaggerMethodArguments the arguments that will be used to create the form parameters' values @return an Iterable with the encoded form parameters
[ "Get", "the", "encoded", "form", "parameters", "that", "have", "been", "added", "to", "this", "value", "based", "on", "the", "provided", "method", "arguments", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L288-L310
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.headers
public Iterable<HttpHeader> headers(Object[] swaggerMethodArguments) { final HttpHeaders result = new HttpHeaders(headers); if (headerSubstitutions != null) { for (Substitution headerSubstitution : headerSubstitutions) { final int parameterIndex = headerSubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[headerSubstitution.methodParameterIndex()]; if (methodArgument instanceof Map) { final Map<String, ?> headerCollection = (Map<String, ?>) methodArgument; final String headerCollectionPrefix = headerSubstitution.urlParameterName(); for (final Map.Entry<String, ?> headerCollectionEntry : headerCollection.entrySet()) { final String headerName = headerCollectionPrefix + headerCollectionEntry.getKey(); final String headerValue = serialize(headerCollectionEntry.getValue()); result.set(headerName, headerValue); } } else { final String headerName = headerSubstitution.urlParameterName(); final String headerValue = serialize(methodArgument); result.set(headerName, headerValue); } } } } return result; }
java
public Iterable<HttpHeader> headers(Object[] swaggerMethodArguments) { final HttpHeaders result = new HttpHeaders(headers); if (headerSubstitutions != null) { for (Substitution headerSubstitution : headerSubstitutions) { final int parameterIndex = headerSubstitution.methodParameterIndex(); if (0 <= parameterIndex && parameterIndex < swaggerMethodArguments.length) { final Object methodArgument = swaggerMethodArguments[headerSubstitution.methodParameterIndex()]; if (methodArgument instanceof Map) { final Map<String, ?> headerCollection = (Map<String, ?>) methodArgument; final String headerCollectionPrefix = headerSubstitution.urlParameterName(); for (final Map.Entry<String, ?> headerCollectionEntry : headerCollection.entrySet()) { final String headerName = headerCollectionPrefix + headerCollectionEntry.getKey(); final String headerValue = serialize(headerCollectionEntry.getValue()); result.set(headerName, headerValue); } } else { final String headerName = headerSubstitution.urlParameterName(); final String headerValue = serialize(methodArgument); result.set(headerName, headerValue); } } } } return result; }
[ "public", "Iterable", "<", "HttpHeader", ">", "headers", "(", "Object", "[", "]", "swaggerMethodArguments", ")", "{", "final", "HttpHeaders", "result", "=", "new", "HttpHeaders", "(", "headers", ")", ";", "if", "(", "headerSubstitutions", "!=", "null", ")", ...
Get the headers that have been added to this value based on the provided method arguments. @param swaggerMethodArguments The arguments that will be used to create the headers' values. @return An Iterable with the headers.
[ "Get", "the", "headers", "that", "have", "been", "added", "to", "this", "value", "based", "on", "the", "provided", "method", "arguments", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L317-L342
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.isExpectedResponseStatusCode
public boolean isExpectedResponseStatusCode(int responseStatusCode, int[] additionalAllowedStatusCodes) { boolean result; if (expectedStatusCodes == null) { result = (responseStatusCode < 400); } else { result = contains(expectedStatusCodes, responseStatusCode) || contains(additionalAllowedStatusCodes, responseStatusCode); } return result; }
java
public boolean isExpectedResponseStatusCode(int responseStatusCode, int[] additionalAllowedStatusCodes) { boolean result; if (expectedStatusCodes == null) { result = (responseStatusCode < 400); } else { result = contains(expectedStatusCodes, responseStatusCode) || contains(additionalAllowedStatusCodes, responseStatusCode); } return result; }
[ "public", "boolean", "isExpectedResponseStatusCode", "(", "int", "responseStatusCode", ",", "int", "[", "]", "additionalAllowedStatusCodes", ")", "{", "boolean", "result", ";", "if", "(", "expectedStatusCodes", "==", "null", ")", "{", "result", "=", "(", "response...
Get whether or not the provided response status code is one of the expected status codes for this Swagger method. @param responseStatusCode the status code that was returned in the HTTP response @param additionalAllowedStatusCodes an additional set of allowed status codes that will be merged with the existing set of allowed status codes for this query @return whether or not the provided response status code is one of the expected status codes for this Swagger method
[ "Get", "whether", "or", "not", "the", "provided", "response", "status", "code", "is", "one", "of", "the", "expected", "status", "codes", "for", "this", "Swagger", "method", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L370-L381
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.body
public Object body(Object[] swaggerMethodArguments) { Object result = null; if (bodyContentMethodParameterIndex != null && swaggerMethodArguments != null && 0 <= bodyContentMethodParameterIndex && bodyContentMethodParameterIndex < swaggerMethodArguments.length) { result = swaggerMethodArguments[bodyContentMethodParameterIndex]; } if (formSubstitutions != null && !formSubstitutions.isEmpty() && swaggerMethodArguments != null) { result = formSubstitutions.stream() .map(s -> serializeFormData(s.urlParameterName(), swaggerMethodArguments[s.methodParameterIndex()])) .collect(Collectors.joining("&")); } return result; }
java
public Object body(Object[] swaggerMethodArguments) { Object result = null; if (bodyContentMethodParameterIndex != null && swaggerMethodArguments != null && 0 <= bodyContentMethodParameterIndex && bodyContentMethodParameterIndex < swaggerMethodArguments.length) { result = swaggerMethodArguments[bodyContentMethodParameterIndex]; } if (formSubstitutions != null && !formSubstitutions.isEmpty() && swaggerMethodArguments != null) { result = formSubstitutions.stream() .map(s -> serializeFormData(s.urlParameterName(), swaggerMethodArguments[s.methodParameterIndex()])) .collect(Collectors.joining("&")); } return result; }
[ "public", "Object", "body", "(", "Object", "[", "]", "swaggerMethodArguments", ")", "{", "Object", "result", "=", "null", ";", "if", "(", "bodyContentMethodParameterIndex", "!=", "null", "&&", "swaggerMethodArguments", "!=", "null", "&&", "0", "<=", "bodyContent...
Get the object to be used as the value of the HTTP request. @param swaggerMethodArguments the method arguments to get the value object from @return the object that will be used as the body of the HTTP request
[ "Get", "the", "object", "to", "be", "used", "as", "the", "value", "of", "the", "HTTP", "request", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L422-L441
train
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java
SwaggerMethodParser.expectsResponseBody
public boolean expectsResponseBody() { boolean result = true; if (TypeUtil.isTypeOrSubTypeOf(returnType, Void.class)) { result = false; } else if (TypeUtil.isTypeOrSubTypeOf(returnType, Mono.class) || TypeUtil.isTypeOrSubTypeOf(returnType, Flux.class)) { final ParameterizedType asyncReturnType = (ParameterizedType) returnType; final Type syncReturnType = asyncReturnType.getActualTypeArguments()[0]; if (TypeUtil.isTypeOrSubTypeOf(syncReturnType, Void.class)) { result = false; } else if (TypeUtil.isTypeOrSubTypeOf(syncReturnType, Response.class)) { result = TypeUtil.restResponseTypeExpectsBody((ParameterizedType) TypeUtil.getSuperType(syncReturnType, Response.class)); } } else if (TypeUtil.isTypeOrSubTypeOf(returnType, Response.class)) { result = TypeUtil.restResponseTypeExpectsBody((ParameterizedType) returnType); } return result; }
java
public boolean expectsResponseBody() { boolean result = true; if (TypeUtil.isTypeOrSubTypeOf(returnType, Void.class)) { result = false; } else if (TypeUtil.isTypeOrSubTypeOf(returnType, Mono.class) || TypeUtil.isTypeOrSubTypeOf(returnType, Flux.class)) { final ParameterizedType asyncReturnType = (ParameterizedType) returnType; final Type syncReturnType = asyncReturnType.getActualTypeArguments()[0]; if (TypeUtil.isTypeOrSubTypeOf(syncReturnType, Void.class)) { result = false; } else if (TypeUtil.isTypeOrSubTypeOf(syncReturnType, Response.class)) { result = TypeUtil.restResponseTypeExpectsBody((ParameterizedType) TypeUtil.getSuperType(syncReturnType, Response.class)); } } else if (TypeUtil.isTypeOrSubTypeOf(returnType, Response.class)) { result = TypeUtil.restResponseTypeExpectsBody((ParameterizedType) returnType); } return result; }
[ "public", "boolean", "expectsResponseBody", "(", ")", "{", "boolean", "result", "=", "true", ";", "if", "(", "TypeUtil", ".", "isTypeOrSubTypeOf", "(", "returnType", ",", "Void", ".", "class", ")", ")", "{", "result", "=", "false", ";", "}", "else", "if"...
Checks whether or not the Swagger method expects the response to contain a body. @return true if Swagger method expects the response to contain a body, false otherwise
[ "Checks", "whether", "or", "not", "the", "Swagger", "method", "expects", "the", "response", "to", "contain", "a", "body", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerMethodParser.java#L489-L507
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java
ContentKeyAuthorizationPolicyOption.create
public static EntityCreateOperation<ContentKeyAuthorizationPolicyOptionInfo> create(String name, int keyDeliveryType, String keyDeliveryConfiguration, List<ContentKeyAuthorizationPolicyRestriction> restrictions) { return new Creator(name, keyDeliveryType, keyDeliveryConfiguration, restrictions); }
java
public static EntityCreateOperation<ContentKeyAuthorizationPolicyOptionInfo> create(String name, int keyDeliveryType, String keyDeliveryConfiguration, List<ContentKeyAuthorizationPolicyRestriction> restrictions) { return new Creator(name, keyDeliveryType, keyDeliveryConfiguration, restrictions); }
[ "public", "static", "EntityCreateOperation", "<", "ContentKeyAuthorizationPolicyOptionInfo", ">", "create", "(", "String", "name", ",", "int", "keyDeliveryType", ",", "String", "keyDeliveryConfiguration", ",", "List", "<", "ContentKeyAuthorizationPolicyRestriction", ">", "r...
Creates an operation to create a new content key authorization options @param name Friendly name of the authorization policy @param keyDeliveryType Delivery method of the content key to the client @param keyDeliveryConfiguration Xml data, specific to the key delivery type that defines how the key is delivered to the client @param restrictions Requirements defined in each restriction must be met in order to deliver the key using the key delivery data @return The operation
[ "Creates", "an", "operation", "to", "create", "a", "new", "content", "key", "authorization", "options" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java#L60-L64
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java
ContentKeyAuthorizationPolicyOption.list
public static DefaultListOperation<ContentKeyAuthorizationPolicyOptionInfo> list( LinkInfo<ContentKeyAuthorizationPolicyOptionInfo> link) { return new DefaultListOperation<ContentKeyAuthorizationPolicyOptionInfo>(link.getHref(), new GenericType<ListResult<ContentKeyAuthorizationPolicyOptionInfo>>() { }); }
java
public static DefaultListOperation<ContentKeyAuthorizationPolicyOptionInfo> list( LinkInfo<ContentKeyAuthorizationPolicyOptionInfo> link) { return new DefaultListOperation<ContentKeyAuthorizationPolicyOptionInfo>(link.getHref(), new GenericType<ListResult<ContentKeyAuthorizationPolicyOptionInfo>>() { }); }
[ "public", "static", "DefaultListOperation", "<", "ContentKeyAuthorizationPolicyOptionInfo", ">", "list", "(", "LinkInfo", "<", "ContentKeyAuthorizationPolicyOptionInfo", ">", "link", ")", "{", "return", "new", "DefaultListOperation", "<", "ContentKeyAuthorizationPolicyOptionInf...
Create an operation that will list all the content keys authorization policy options at the given link. @param link Link to request content keys authorization policy options from. @return The list operation.
[ "Create", "an", "operation", "that", "will", "list", "all", "the", "content", "keys", "authorization", "policy", "options", "at", "the", "given", "link", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyAuthorizationPolicyOption.java#L122-L127
train
Azure/azure-sdk-for-java
sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ManagedInstanceVulnerabilityAssessmentsInner.java
ManagedInstanceVulnerabilityAssessmentsInner.getAsync
public Observable<ManagedInstanceVulnerabilityAssessmentInner> getAsync(String resourceGroupName, String managedInstanceName) { return getWithServiceResponseAsync(resourceGroupName, managedInstanceName).map(new Func1<ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner>, ManagedInstanceVulnerabilityAssessmentInner>() { @Override public ManagedInstanceVulnerabilityAssessmentInner call(ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner> response) { return response.body(); } }); }
java
public Observable<ManagedInstanceVulnerabilityAssessmentInner> getAsync(String resourceGroupName, String managedInstanceName) { return getWithServiceResponseAsync(resourceGroupName, managedInstanceName).map(new Func1<ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner>, ManagedInstanceVulnerabilityAssessmentInner>() { @Override public ManagedInstanceVulnerabilityAssessmentInner call(ServiceResponse<ManagedInstanceVulnerabilityAssessmentInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "ManagedInstanceVulnerabilityAssessmentInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "managedInstanceName", ")",...
Gets the managed instance's vulnerability assessment. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance for which the vulnerability assessment is defined. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ManagedInstanceVulnerabilityAssessmentInner object
[ "Gets", "the", "managed", "instance", "s", "vulnerability", "assessment", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ManagedInstanceVulnerabilityAssessmentsInner.java#L122-L129
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.getMimeMultipart
public MimeMultipart getMimeMultipart() throws MessagingException, IOException, JAXBException { List<DataSource> bodyPartContents = createRequestBody(); return toMimeMultipart(bodyPartContents); }
java
public MimeMultipart getMimeMultipart() throws MessagingException, IOException, JAXBException { List<DataSource> bodyPartContents = createRequestBody(); return toMimeMultipart(bodyPartContents); }
[ "public", "MimeMultipart", "getMimeMultipart", "(", ")", "throws", "MessagingException", ",", "IOException", ",", "JAXBException", "{", "List", "<", "DataSource", ">", "bodyPartContents", "=", "createRequestBody", "(", ")", ";", "return", "toMimeMultipart", "(", "bo...
Gets the mime multipart. @return the mime multipart @throws MessagingException the messaging exception @throws IOException Signals that an I/O exception has occurred. @throws JAXBException the jAXB exception
[ "Gets", "the", "mime", "multipart", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L114-L119
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.addJobPart
private int addJobPart(List<DataSource> bodyPartContents, URI jobURI, int contentId) throws JAXBException { int jobContentId = contentId; validateJobOperation(); for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { DataSource bodyPartContent = null; if (entityBatchOperation instanceof Job.CreateBatchOperation) { Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; jobContentId = contentId; bodyPartContent = createBatchCreateEntityPart( jobCreateBatchOperation.getVerb(), "Jobs", jobCreateBatchOperation.getEntryType(), jobURI, contentId); contentId++; if (bodyPartContent != null) { bodyPartContents.add(bodyPartContent); break; } } } return jobContentId; }
java
private int addJobPart(List<DataSource> bodyPartContents, URI jobURI, int contentId) throws JAXBException { int jobContentId = contentId; validateJobOperation(); for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { DataSource bodyPartContent = null; if (entityBatchOperation instanceof Job.CreateBatchOperation) { Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; jobContentId = contentId; bodyPartContent = createBatchCreateEntityPart( jobCreateBatchOperation.getVerb(), "Jobs", jobCreateBatchOperation.getEntryType(), jobURI, contentId); contentId++; if (bodyPartContent != null) { bodyPartContents.add(bodyPartContent); break; } } } return jobContentId; }
[ "private", "int", "addJobPart", "(", "List", "<", "DataSource", ">", "bodyPartContents", ",", "URI", "jobURI", ",", "int", "contentId", ")", "throws", "JAXBException", "{", "int", "jobContentId", "=", "contentId", ";", "validateJobOperation", "(", ")", ";", "f...
Adds the job part. @param bodyPartContents the body part contents @param contentId the content id @return the int @throws JAXBException the jAXB exception
[ "Adds", "the", "job", "part", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L147-L169
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.addTaskPart
private void addTaskPart(List<DataSource> bodyPartContents, URI taskURI, int contentId) throws JAXBException { for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { DataSource bodyPartContent = null; if (entityBatchOperation instanceof Task.CreateBatchOperation) { Task.CreateBatchOperation createTaskOperation = (Task.CreateBatchOperation) entityBatchOperation; bodyPartContent = createBatchCreateEntityPart( createTaskOperation.getVerb(), "Tasks", createTaskOperation.getEntryType(), taskURI, contentId); contentId++; } if (bodyPartContent != null) { bodyPartContents.add(bodyPartContent); } } }
java
private void addTaskPart(List<DataSource> bodyPartContents, URI taskURI, int contentId) throws JAXBException { for (EntityBatchOperation entityBatchOperation : entityBatchOperations) { DataSource bodyPartContent = null; if (entityBatchOperation instanceof Task.CreateBatchOperation) { Task.CreateBatchOperation createTaskOperation = (Task.CreateBatchOperation) entityBatchOperation; bodyPartContent = createBatchCreateEntityPart( createTaskOperation.getVerb(), "Tasks", createTaskOperation.getEntryType(), taskURI, contentId); contentId++; } if (bodyPartContent != null) { bodyPartContents.add(bodyPartContent); } } }
[ "private", "void", "addTaskPart", "(", "List", "<", "DataSource", ">", "bodyPartContents", ",", "URI", "taskURI", ",", "int", "contentId", ")", "throws", "JAXBException", "{", "for", "(", "EntityBatchOperation", "entityBatchOperation", ":", "entityBatchOperations", ...
Adds the task part. @param bodyPartContents the body part contents @param taskURI the task uri @param contentId the content id @throws JAXBException the jAXB exception
[ "Adds", "the", "task", "part", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L199-L215
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.toMimeMultipart
private MimeMultipart toMimeMultipart(List<DataSource> bodyPartContents) throws MessagingException, IOException { String changeSetId = String.format("changeset_%s", UUID.randomUUID() .toString()); MimeMultipart changeSets = createChangeSets(bodyPartContents, changeSetId); MimeBodyPart mimeBodyPart = createMimeBodyPart(changeSets, changeSetId); MimeMultipart mimeMultipart = new BatchMimeMultipart( new SetBoundaryMultipartDataSource(batchId)); mimeMultipart.addBodyPart(mimeBodyPart); return mimeMultipart; }
java
private MimeMultipart toMimeMultipart(List<DataSource> bodyPartContents) throws MessagingException, IOException { String changeSetId = String.format("changeset_%s", UUID.randomUUID() .toString()); MimeMultipart changeSets = createChangeSets(bodyPartContents, changeSetId); MimeBodyPart mimeBodyPart = createMimeBodyPart(changeSets, changeSetId); MimeMultipart mimeMultipart = new BatchMimeMultipart( new SetBoundaryMultipartDataSource(batchId)); mimeMultipart.addBodyPart(mimeBodyPart); return mimeMultipart; }
[ "private", "MimeMultipart", "toMimeMultipart", "(", "List", "<", "DataSource", ">", "bodyPartContents", ")", "throws", "MessagingException", ",", "IOException", "{", "String", "changeSetId", "=", "String", ".", "format", "(", "\"changeset_%s\"", ",", "UUID", ".", ...
To mime multipart. @param bodyPartContents the body part contents @return the mime multipart @throws MessagingException the messaging exception @throws IOException Signals that an I/O exception has occurred.
[ "To", "mime", "multipart", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L228-L241
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.createBatchCreateEntityPart
private DataSource createBatchCreateEntityPart(String verb, String entityName, EntryType entryType, URI uri, int contentId) throws JAXBException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); this.oDataAtomMarshaller.marshalEntryType(entryType, stream); byte[] bytes = stream.toByteArray(); // adds header InternetHeaders headers = new InternetHeaders(); headers.addHeader("Content-ID", Integer.toString(contentId)); headers.addHeader("Content-Type", "application/atom+xml;type=entry"); headers.addHeader("Content-Length", Integer.toString(bytes.length)); headers.addHeader("DataServiceVersion", "3.0;NetFx"); headers.addHeader("MaxDataServiceVersion", "3.0;NetFx"); // adds body ByteArrayOutputStream httpRequest = new ByteArrayOutputStream(); addHttpMethod(httpRequest, verb, uri); appendHeaders(httpRequest, headers); appendEntity(httpRequest, new ByteArrayInputStream(bytes)); DataSource bodyPartContent = new InputStreamDataSource( new ByteArrayInputStream(httpRequest.toByteArray()), "application/http"); return bodyPartContent; }
java
private DataSource createBatchCreateEntityPart(String verb, String entityName, EntryType entryType, URI uri, int contentId) throws JAXBException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); this.oDataAtomMarshaller.marshalEntryType(entryType, stream); byte[] bytes = stream.toByteArray(); // adds header InternetHeaders headers = new InternetHeaders(); headers.addHeader("Content-ID", Integer.toString(contentId)); headers.addHeader("Content-Type", "application/atom+xml;type=entry"); headers.addHeader("Content-Length", Integer.toString(bytes.length)); headers.addHeader("DataServiceVersion", "3.0;NetFx"); headers.addHeader("MaxDataServiceVersion", "3.0;NetFx"); // adds body ByteArrayOutputStream httpRequest = new ByteArrayOutputStream(); addHttpMethod(httpRequest, verb, uri); appendHeaders(httpRequest, headers); appendEntity(httpRequest, new ByteArrayInputStream(bytes)); DataSource bodyPartContent = new InputStreamDataSource( new ByteArrayInputStream(httpRequest.toByteArray()), "application/http"); return bodyPartContent; }
[ "private", "DataSource", "createBatchCreateEntityPart", "(", "String", "verb", ",", "String", "entityName", ",", "EntryType", "entryType", ",", "URI", "uri", ",", "int", "contentId", ")", "throws", "JAXBException", "{", "ByteArrayOutputStream", "stream", "=", "new",...
Creates the batch create entity part. @param entityName the entity name @param entity the entity @param uri the uri @param contentId the content id @return the data source @throws JAXBException the jAXB exception
[ "Creates", "the", "batch", "create", "entity", "part", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L287-L312
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.parseBatchResult
public void parseBatchResult(ClientResponse response) throws IOException, ServiceException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); InputStream inputStream = response.getEntityInputStream(); ReaderWriter.writeTo(inputStream, byteArrayOutputStream); response.setEntityInputStream(new ByteArrayInputStream( byteArrayOutputStream.toByteArray())); JobInfo jobInfo; List<DataSource> parts = parseParts(response.getEntityInputStream(), response.getHeaders().getFirst("Content-Type")); if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) { throw new UniformInterfaceException(String.format( "Batch response from server does not contain the correct amount " + "of parts (expecting %d, received %d instead)", parts.size(), entityBatchOperations.size()), response); } for (int i = 0; i < parts.size(); i++) { DataSource ds = parts.get(i); EntityBatchOperation entityBatchOperation = entityBatchOperations .get(i); StatusLine status = StatusLine.create(ds); InternetHeaders headers = parseHeaders(ds); InputStream content = parseEntity(ds); if (status.getStatus() >= HTTP_ERROR) { InBoundHeaders inBoundHeaders = new InBoundHeaders(); @SuppressWarnings("unchecked") Enumeration<Header> e = headers.getAllHeaders(); while (e.hasMoreElements()) { Header header = e.nextElement(); inBoundHeaders.putSingle(header.getName(), header.getValue()); } ClientResponse clientResponse = new ClientResponse( status.getStatus(), inBoundHeaders, content, null); UniformInterfaceException uniformInterfaceException = new UniformInterfaceException( clientResponse); throw uniformInterfaceException; } else if (entityBatchOperation instanceof Job.CreateBatchOperation) { try { jobInfo = oDataAtomUnmarshaller.unmarshalEntry(content, JobInfo.class); Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; jobCreateBatchOperation.setJobInfo(jobInfo); } catch (JAXBException e) { throw new ServiceException(e); } } else if (entityBatchOperation instanceof Task.CreateBatchOperation) { try { oDataAtomUnmarshaller.unmarshalEntry(content, TaskInfo.class); } catch (JAXBException e) { throw new ServiceException(e); } } } }
java
public void parseBatchResult(ClientResponse response) throws IOException, ServiceException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); InputStream inputStream = response.getEntityInputStream(); ReaderWriter.writeTo(inputStream, byteArrayOutputStream); response.setEntityInputStream(new ByteArrayInputStream( byteArrayOutputStream.toByteArray())); JobInfo jobInfo; List<DataSource> parts = parseParts(response.getEntityInputStream(), response.getHeaders().getFirst("Content-Type")); if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) { throw new UniformInterfaceException(String.format( "Batch response from server does not contain the correct amount " + "of parts (expecting %d, received %d instead)", parts.size(), entityBatchOperations.size()), response); } for (int i = 0; i < parts.size(); i++) { DataSource ds = parts.get(i); EntityBatchOperation entityBatchOperation = entityBatchOperations .get(i); StatusLine status = StatusLine.create(ds); InternetHeaders headers = parseHeaders(ds); InputStream content = parseEntity(ds); if (status.getStatus() >= HTTP_ERROR) { InBoundHeaders inBoundHeaders = new InBoundHeaders(); @SuppressWarnings("unchecked") Enumeration<Header> e = headers.getAllHeaders(); while (e.hasMoreElements()) { Header header = e.nextElement(); inBoundHeaders.putSingle(header.getName(), header.getValue()); } ClientResponse clientResponse = new ClientResponse( status.getStatus(), inBoundHeaders, content, null); UniformInterfaceException uniformInterfaceException = new UniformInterfaceException( clientResponse); throw uniformInterfaceException; } else if (entityBatchOperation instanceof Job.CreateBatchOperation) { try { jobInfo = oDataAtomUnmarshaller.unmarshalEntry(content, JobInfo.class); Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; jobCreateBatchOperation.setJobInfo(jobInfo); } catch (JAXBException e) { throw new ServiceException(e); } } else if (entityBatchOperation instanceof Task.CreateBatchOperation) { try { oDataAtomUnmarshaller.unmarshalEntry(content, TaskInfo.class); } catch (JAXBException e) { throw new ServiceException(e); } } } }
[ "public", "void", "parseBatchResult", "(", "ClientResponse", "response", ")", "throws", "IOException", ",", "ServiceException", "{", "ByteArrayOutputStream", "byteArrayOutputStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "InputStream", "inputStream", "=", ...
Parses the batch result. @param response the response @param mediaBatchOperations the media batch operations @throws IOException Signals that an I/O exception has occurred. @throws ServiceException the service exception
[ "Parses", "the", "batch", "result", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L326-L390
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.parseHeaders
private InternetHeaders parseHeaders(DataSource ds) { try { return new InternetHeaders(ds.getInputStream()); } catch (MessagingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
java
private InternetHeaders parseHeaders(DataSource ds) { try { return new InternetHeaders(ds.getInputStream()); } catch (MessagingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
[ "private", "InternetHeaders", "parseHeaders", "(", "DataSource", "ds", ")", "{", "try", "{", "return", "new", "InternetHeaders", "(", "ds", ".", "getInputStream", "(", ")", ")", ";", "}", "catch", "(", "MessagingException", "e", ")", "{", "throw", "new", "...
Parses the headers. @param ds the ds @return the internet headers
[ "Parses", "the", "headers", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L399-L407
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.parseEntity
private InputStream parseEntity(DataSource ds) { try { return ds.getInputStream(); } catch (IOException e) { throw new RuntimeException(e); } }
java
private InputStream parseEntity(DataSource ds) { try { return ds.getInputStream(); } catch (IOException e) { throw new RuntimeException(e); } }
[ "private", "InputStream", "parseEntity", "(", "DataSource", "ds", ")", "{", "try", "{", "return", "ds", ".", "getInputStream", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "new", "RuntimeException", "(", "e", ")", ";", "}", ...
Parses the entity. @param ds the ds @return the input stream
[ "Parses", "the", "entity", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L416-L422
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.parseParts
private List<DataSource> parseParts(final InputStream entityInputStream, final String contentType) { try { return parsePartsCore(entityInputStream, contentType); } catch (IOException e) { throw new RuntimeException(e); } catch (MessagingException e) { throw new RuntimeException(e); } }
java
private List<DataSource> parseParts(final InputStream entityInputStream, final String contentType) { try { return parsePartsCore(entityInputStream, contentType); } catch (IOException e) { throw new RuntimeException(e); } catch (MessagingException e) { throw new RuntimeException(e); } }
[ "private", "List", "<", "DataSource", ">", "parseParts", "(", "final", "InputStream", "entityInputStream", ",", "final", "String", "contentType", ")", "{", "try", "{", "return", "parsePartsCore", "(", "entityInputStream", ",", "contentType", ")", ";", "}", "catc...
Parses the parts. @param entityInputStream the entity input stream @param contentType the content type @return the list
[ "Parses", "the", "parts", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L433-L442
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.parsePartsCore
private List<DataSource> parsePartsCore(InputStream entityInputStream, String contentType) throws MessagingException, IOException { DataSource dataSource = new InputStreamDataSource(entityInputStream, contentType); MimeMultipart batch = new MimeMultipart(dataSource); MimeBodyPart batchBody = (MimeBodyPart) batch.getBodyPart(0); MimeMultipart changeSets = new MimeMultipart(new MimePartDataSource( batchBody)); List<DataSource> result = new ArrayList<DataSource>(); for (int i = 0; i < changeSets.getCount(); i++) { BodyPart part = changeSets.getBodyPart(i); result.add(new InputStreamDataSource(part.getInputStream(), part .getContentType())); } return result; }
java
private List<DataSource> parsePartsCore(InputStream entityInputStream, String contentType) throws MessagingException, IOException { DataSource dataSource = new InputStreamDataSource(entityInputStream, contentType); MimeMultipart batch = new MimeMultipart(dataSource); MimeBodyPart batchBody = (MimeBodyPart) batch.getBodyPart(0); MimeMultipart changeSets = new MimeMultipart(new MimePartDataSource( batchBody)); List<DataSource> result = new ArrayList<DataSource>(); for (int i = 0; i < changeSets.getCount(); i++) { BodyPart part = changeSets.getBodyPart(i); result.add(new InputStreamDataSource(part.getInputStream(), part .getContentType())); } return result; }
[ "private", "List", "<", "DataSource", ">", "parsePartsCore", "(", "InputStream", "entityInputStream", ",", "String", "contentType", ")", "throws", "MessagingException", ",", "IOException", "{", "DataSource", "dataSource", "=", "new", "InputStreamDataSource", "(", "ent...
Parses the parts core. @param entityInputStream the entity input stream @param contentType the content type @return the list @throws MessagingException the messaging exception @throws IOException Signals that an I/O exception has occurred.
[ "Parses", "the", "parts", "core", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L457-L475
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.addHttpMethod
private void addHttpMethod(ByteArrayOutputStream outputStream, String verb, URI uri) { try { String method = String.format("%s %s HTTP/1.1\r\n", verb, uri); outputStream.write(method.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
java
private void addHttpMethod(ByteArrayOutputStream outputStream, String verb, URI uri) { try { String method = String.format("%s %s HTTP/1.1\r\n", verb, uri); outputStream.write(method.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
[ "private", "void", "addHttpMethod", "(", "ByteArrayOutputStream", "outputStream", ",", "String", "verb", ",", "URI", "uri", ")", "{", "try", "{", "String", "method", "=", "String", ".", "format", "(", "\"%s %s HTTP/1.1\\r\\n\"", ",", "verb", ",", "uri", ")", ...
Adds the http method. @param outputStream the output stream @param verb the verb @param uri the uri
[ "Adds", "the", "http", "method", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L497-L507
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.appendHeaders
private void appendHeaders(OutputStream outputStream, InternetHeaders internetHeaders) { try { // Headers @SuppressWarnings("unchecked") Enumeration<Header> headers = internetHeaders.getAllHeaders(); while (headers.hasMoreElements()) { Header header = headers.nextElement(); String headerLine = String.format("%s: %s\r\n", header.getName(), header.getValue()); outputStream.write(headerLine.getBytes("UTF-8")); } // Empty line outputStream.write("\r\n".getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
java
private void appendHeaders(OutputStream outputStream, InternetHeaders internetHeaders) { try { // Headers @SuppressWarnings("unchecked") Enumeration<Header> headers = internetHeaders.getAllHeaders(); while (headers.hasMoreElements()) { Header header = headers.nextElement(); String headerLine = String.format("%s: %s\r\n", header.getName(), header.getValue()); outputStream.write(headerLine.getBytes("UTF-8")); } // Empty line outputStream.write("\r\n".getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
[ "private", "void", "appendHeaders", "(", "OutputStream", "outputStream", ",", "InternetHeaders", "internetHeaders", ")", "{", "try", "{", "// Headers", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Enumeration", "<", "Header", ">", "headers", "=", "internetHe...
Append headers. @param outputStream the output stream @param internetHeaders the internet headers
[ "Append", "headers", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L517-L537
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java
MediaBatchOperations.appendEntity
private void appendEntity(OutputStream outputStream, ByteArrayInputStream byteArrayInputStream) { try { byte[] buffer = new byte[BUFFER_SIZE]; while (true) { int bytesRead = byteArrayInputStream.read(buffer); if (bytesRead <= 0) { break; } outputStream.write(buffer, 0, bytesRead); } } catch (IOException e) { throw new RuntimeException(e); } }
java
private void appendEntity(OutputStream outputStream, ByteArrayInputStream byteArrayInputStream) { try { byte[] buffer = new byte[BUFFER_SIZE]; while (true) { int bytesRead = byteArrayInputStream.read(buffer); if (bytesRead <= 0) { break; } outputStream.write(buffer, 0, bytesRead); } } catch (IOException e) { throw new RuntimeException(e); } }
[ "private", "void", "appendEntity", "(", "OutputStream", "outputStream", ",", "ByteArrayInputStream", "byteArrayInputStream", ")", "{", "try", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "]", ";", "while", "(", "true", ")", "{", "...
Append entity. @param outputStream the output stream @param byteArrayInputStream the byte array input stream
[ "Append", "entity", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java#L547-L561
train
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetExecutionsInner.java
JobTargetExecutionsInner.getAsync
public ServiceFuture<JobExecutionInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId, final ServiceCallback<JobExecutionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId), serviceCallback); }
java
public ServiceFuture<JobExecutionInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId, String stepName, UUID targetId, final ServiceCallback<JobExecutionInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName, targetId), serviceCallback); }
[ "public", "ServiceFuture", "<", "JobExecutionInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "jobName", ",", "UUID", "jobExecutionId", ",", "String", "stepName", ",", "UUID", "...
Gets a target execution. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param jobName The name of the job to get. @param jobExecutionId The unique id of the job execution @param stepName The name of the step. @param targetId The target 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
[ "Gets", "a", "target", "execution", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetExecutionsInner.java#L791-L793
train
Azure/azure-sdk-for-java
common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/PollStrategy.java
PollStrategy.updateDelayInMillisecondsFrom
final void updateDelayInMillisecondsFrom(HttpResponse httpPollResponse) { final Long parsedDelayInMilliseconds = delayInMillisecondsFrom(httpPollResponse); if (parsedDelayInMilliseconds != null) { delayInMilliseconds = parsedDelayInMilliseconds; } }
java
final void updateDelayInMillisecondsFrom(HttpResponse httpPollResponse) { final Long parsedDelayInMilliseconds = delayInMillisecondsFrom(httpPollResponse); if (parsedDelayInMilliseconds != null) { delayInMilliseconds = parsedDelayInMilliseconds; } }
[ "final", "void", "updateDelayInMillisecondsFrom", "(", "HttpResponse", "httpPollResponse", ")", "{", "final", "Long", "parsedDelayInMilliseconds", "=", "delayInMillisecondsFrom", "(", "httpPollResponse", ")", ";", "if", "(", "parsedDelayInMilliseconds", "!=", "null", ")",...
Update the delay in milliseconds from the provided HTTP poll response. @param httpPollResponse The HTTP poll response to update the delay in milliseconds from.
[ "Update", "the", "delay", "in", "milliseconds", "from", "the", "provided", "HTTP", "poll", "response", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/PollStrategy.java#L92-L97
train
Azure/azure-sdk-for-java
common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/PollStrategy.java
PollStrategy.delayAsync
Mono<Void> delayAsync() { Mono<Void> result = Mono.empty(); if (delayInMilliseconds > 0) { result = result.delaySubscription(Duration.ofMillis(delayInMilliseconds)); } return result; }
java
Mono<Void> delayAsync() { Mono<Void> result = Mono.empty(); if (delayInMilliseconds > 0) { result = result.delaySubscription(Duration.ofMillis(delayInMilliseconds)); } return result; }
[ "Mono", "<", "Void", ">", "delayAsync", "(", ")", "{", "Mono", "<", "Void", ">", "result", "=", "Mono", ".", "empty", "(", ")", ";", "if", "(", "delayInMilliseconds", ">", "0", ")", "{", "result", "=", "result", ".", "delaySubscription", "(", "Durati...
If this OperationStatus has a retryAfterSeconds value, return an Mono that is delayed by the number of seconds that are in the retryAfterSeconds value. If this OperationStatus doesn't have a retryAfterSeconds value, then return an Single with no delay. @return A Mono with delay if this OperationStatus has a retryAfterSeconds value.
[ "If", "this", "OperationStatus", "has", "a", "retryAfterSeconds", "value", "return", "an", "Mono", "that", "is", "delayed", "by", "the", "number", "of", "seconds", "that", "are", "in", "the", "retryAfterSeconds", "value", ".", "If", "this", "OperationStatus", ...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common-mgmt/src/main/java/com/azure/common/mgmt/PollStrategy.java#L116-L122
train
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java
TriggersInner.getAsync
public Observable<TriggerInner> getAsync(String deviceName, String name, String resourceGroupName) { return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<TriggerInner>, TriggerInner>() { @Override public TriggerInner call(ServiceResponse<TriggerInner> response) { return response.body(); } }); }
java
public Observable<TriggerInner> getAsync(String deviceName, String name, String resourceGroupName) { return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<TriggerInner>, TriggerInner>() { @Override public TriggerInner call(ServiceResponse<TriggerInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "TriggerInner", ">", "getAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "resourceGroupName", ")", ...
Get a specific trigger by name. @param deviceName The device name. @param name The trigger name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the TriggerInner object
[ "Get", "a", "specific", "trigger", "by", "name", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java#L377-L384
train
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/EncryptionProtectorsInner.java
EncryptionProtectorsInner.getAsync
public Observable<EncryptionProtectorInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<EncryptionProtectorInner>, EncryptionProtectorInner>() { @Override public EncryptionProtectorInner call(ServiceResponse<EncryptionProtectorInner> response) { return response.body(); } }); }
java
public Observable<EncryptionProtectorInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<EncryptionProtectorInner>, EncryptionProtectorInner>() { @Override public EncryptionProtectorInner call(ServiceResponse<EncryptionProtectorInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "EncryptionProtectorInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", "new", "F...
Gets a server encryption protector. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the EncryptionProtectorInner object
[ "Gets", "a", "server", "encryption", "protector", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/EncryptionProtectorsInner.java#L243-L250
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java
EncryptionUtils.eraseKey
public static void eraseKey(byte[] keyToErase) { if (keyToErase != null) { SecureRandom random; try { random = SecureRandom.getInstance("SHA1PRNG"); random.nextBytes(keyToErase); } catch (NoSuchAlgorithmException e) { // never reached } } }
java
public static void eraseKey(byte[] keyToErase) { if (keyToErase != null) { SecureRandom random; try { random = SecureRandom.getInstance("SHA1PRNG"); random.nextBytes(keyToErase); } catch (NoSuchAlgorithmException e) { // never reached } } }
[ "public", "static", "void", "eraseKey", "(", "byte", "[", "]", "keyToErase", ")", "{", "if", "(", "keyToErase", "!=", "null", ")", "{", "SecureRandom", "random", ";", "try", "{", "random", "=", "SecureRandom", ".", "getInstance", "(", "\"SHA1PRNG\"", ")", ...
Overwrites the supplied byte array with RNG generated data which destroys the original contents. @param keyToErase The content key to erase.
[ "Overwrites", "the", "supplied", "byte", "array", "with", "RNG", "generated", "data", "which", "destroys", "the", "original", "contents", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/EncryptionUtils.java#L55-L65
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/auth/BatchSharedKeyCredentialsInterceptor.java
BatchSharedKeyCredentialsInterceptor.intercept
@Override public Response intercept(Interceptor.Chain chain) throws IOException { Request newRequest = this.signHeader(chain.request()); return chain.proceed(newRequest); }
java
@Override public Response intercept(Interceptor.Chain chain) throws IOException { Request newRequest = this.signHeader(chain.request()); return chain.proceed(newRequest); }
[ "@", "Override", "public", "Response", "intercept", "(", "Interceptor", ".", "Chain", "chain", ")", "throws", "IOException", "{", "Request", "newRequest", "=", "this", ".", "signHeader", "(", "chain", ".", "request", "(", ")", ")", ";", "return", "chain", ...
Inject the new authentication HEADER @param chain The interceptor chain @return Response of the request @throws IOException Exception thrown from serialization
[ "Inject", "the", "new", "authentication", "HEADER" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/auth/BatchSharedKeyCredentialsInterceptor.java#L51-L55
train
Azure/azure-sdk-for-java
recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/JobsInner.java
JobsInner.exportWithServiceResponseAsync
public Observable<ServiceResponse<Void>> exportWithServiceResponseAsync(String vaultName, String resourceGroupName, String filter) { if (vaultName == null) { throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.export(vaultName, resourceGroupName, this.client.subscriptionId(), apiVersion, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = exportDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
java
public Observable<ServiceResponse<Void>> exportWithServiceResponseAsync(String vaultName, String resourceGroupName, String filter) { if (vaultName == null) { throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2017-07-01"; return service.export(vaultName, resourceGroupName, this.client.subscriptionId(), apiVersion, filter, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = exportDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
[ "public", "Observable", "<", "ServiceResponse", "<", "Void", ">", ">", "exportWithServiceResponseAsync", "(", "String", "vaultName", ",", "String", "resourceGroupName", ",", "String", "filter", ")", "{", "if", "(", "vaultName", "==", "null", ")", "{", "throw", ...
Triggers export of jobs specified by filters and returns an OperationID to track. @param vaultName The name of the recovery services vault. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param filter OData filter options. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Triggers", "export", "of", "jobs", "specified", "by", "filters", "and", "returns", "an", "OperationID", "to", "track", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2017_07_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2017_07_01/implementation/JobsInner.java#L192-L215
train
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java
DatabaseBlobAuditingPoliciesInner.getAsync
public Observable<DatabaseBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseBlobAuditingPolicyInner>, DatabaseBlobAuditingPolicyInner>() { @Override public DatabaseBlobAuditingPolicyInner call(ServiceResponse<DatabaseBlobAuditingPolicyInner> response) { return response.body(); } }); }
java
public Observable<DatabaseBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseBlobAuditingPolicyInner>, DatabaseBlobAuditingPolicyInner>() { @Override public DatabaseBlobAuditingPolicyInner call(ServiceResponse<DatabaseBlobAuditingPolicyInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "DatabaseBlobAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName",...
Gets a database's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DatabaseBlobAuditingPolicyInner object
[ "Gets", "a", "database", "s", "blob", "auditing", "policy", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java#L105-L112
train
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java
DatabaseBlobAuditingPoliciesInner.createOrUpdateAsync
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceResponse<DatabaseBlobAuditingPolicyInner>, DatabaseBlobAuditingPolicyInner>() { @Override public DatabaseBlobAuditingPolicyInner call(ServiceResponse<DatabaseBlobAuditingPolicyInner> response) { return response.body(); } }); }
java
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceResponse<DatabaseBlobAuditingPolicyInner>, DatabaseBlobAuditingPolicyInner>() { @Override public DatabaseBlobAuditingPolicyInner call(ServiceResponse<DatabaseBlobAuditingPolicyInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "DatabaseBlobAuditingPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "DatabaseBlobAuditingPolicyInner", "parameters", ")", "{", "return", "createOrUpd...
Creates or updates a database's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param parameters The database blob auditing policy. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DatabaseBlobAuditingPolicyInner object
[ "Creates", "or", "updates", "a", "database", "s", "blob", "auditing", "policy", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java#L202-L209
train
Azure/azure-sdk-for-java
eventhubs/data-plane/azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/RetryPolicy.java
RetryPolicy.getNextRetryInterval
public Duration getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime) { int baseWaitTime = 0; synchronized (this.serverBusySync) { if (lastException != null && (lastException instanceof ServerBusyException || (lastException.getCause() != null && lastException.getCause() instanceof ServerBusyException))) { baseWaitTime += ClientConstants.SERVER_BUSY_BASE_SLEEP_TIME_IN_SECS; } } return this.onGetNextRetryInterval(clientId, lastException, remainingTime, baseWaitTime); }
java
public Duration getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime) { int baseWaitTime = 0; synchronized (this.serverBusySync) { if (lastException != null && (lastException instanceof ServerBusyException || (lastException.getCause() != null && lastException.getCause() instanceof ServerBusyException))) { baseWaitTime += ClientConstants.SERVER_BUSY_BASE_SLEEP_TIME_IN_SECS; } } return this.onGetNextRetryInterval(clientId, lastException, remainingTime, baseWaitTime); }
[ "public", "Duration", "getNextRetryInterval", "(", "String", "clientId", ",", "Exception", "lastException", ",", "Duration", "remainingTime", ")", "{", "int", "baseWaitTime", "=", "0", ";", "synchronized", "(", "this", ".", "serverBusySync", ")", "{", "if", "(",...
Gets the Interval after which nextRetry should be done. @param clientId clientId @param lastException lastException @param remainingTime remainingTime to retry @return returns 'null' Duration when not Allowed
[ "Gets", "the", "Interval", "after", "which", "nextRetry", "should", "be", "done", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventhubs/data-plane/azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/RetryPolicy.java#L76-L86
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.deletePool
public void deletePool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolDeleteOptions options = new PoolDeleteOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().delete(poolId, options); }
java
public void deletePool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolDeleteOptions options = new PoolDeleteOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().delete(poolId, options); }
[ "public", "void", "deletePool", "(", "String", "poolId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolDeleteOptions", "options", "=", "new", "PoolDeleteOptions", "(", ")", ...
Deletes the specified pool. @param poolId The ID of the pool to delete. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Deletes", "the", "specified", "pool", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L258-L265
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.stopResizePool
public void stopResizePool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolStopResizeOptions options = new PoolStopResizeOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().stopResize(poolId, options); }
java
public void stopResizePool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolStopResizeOptions options = new PoolStopResizeOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().stopResize(poolId, options); }
[ "public", "void", "stopResizePool", "(", "String", "poolId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolStopResizeOptions", "options", "=", "new", "PoolStopResizeOptions", ...
Stops a pool resize operation. @param poolId The ID of the pool. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Stops", "a", "pool", "resize", "operation", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L649-L656
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.disableAutoScale
public void disableAutoScale(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolDisableAutoScaleOptions options = new PoolDisableAutoScaleOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().disableAutoScale(poolId, options); }
java
public void disableAutoScale(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolDisableAutoScaleOptions options = new PoolDisableAutoScaleOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); this.parentBatchClient.protocolLayer().pools().disableAutoScale(poolId, options); }
[ "public", "void", "disableAutoScale", "(", "String", "poolId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolDisableAutoScaleOptions", "options", "=", "new", "PoolDisableAutoSca...
Disables automatic scaling on the specified pool. @param poolId The ID of the pool. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Disables", "automatic", "scaling", "on", "the", "specified", "pool", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L781-L788
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.existsPool
public boolean existsPool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolExistsOptions options = new PoolExistsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); return this.parentBatchClient.protocolLayer().pools().exists(poolId, options); }
java
public boolean existsPool(String poolId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolExistsOptions options = new PoolExistsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); return this.parentBatchClient.protocolLayer().pools().exists(poolId, options); }
[ "public", "boolean", "existsPool", "(", "String", "poolId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolExistsOptions", "options", "=", "new", "PoolExistsOptions", "(", ")...
Checks whether the specified pool exists. @param poolId The ID of the pool. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @return True if the pool exists; otherwise, false. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Checks", "whether", "the", "specified", "pool", "exists", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L1060-L1068
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.patchPool
public void patchPool(String poolId, StartTask startTask, Collection<CertificateReference> certificateReferences, Collection<ApplicationPackageReference> applicationPackageReferences, Collection<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolPatchOptions options = new PoolPatchOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); PoolPatchParameter param = new PoolPatchParameter().withStartTask(startTask); if (metadata != null) { param.withMetadata(new LinkedList<>(metadata)); } if (applicationPackageReferences != null) { param.withApplicationPackageReferences(new LinkedList<>(applicationPackageReferences)); } if (certificateReferences != null) { param.withCertificateReferences(new LinkedList<>(certificateReferences)); } this.parentBatchClient.protocolLayer().pools().patch(poolId, param, options); }
java
public void patchPool(String poolId, StartTask startTask, Collection<CertificateReference> certificateReferences, Collection<ApplicationPackageReference> applicationPackageReferences, Collection<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolPatchOptions options = new PoolPatchOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); PoolPatchParameter param = new PoolPatchParameter().withStartTask(startTask); if (metadata != null) { param.withMetadata(new LinkedList<>(metadata)); } if (applicationPackageReferences != null) { param.withApplicationPackageReferences(new LinkedList<>(applicationPackageReferences)); } if (certificateReferences != null) { param.withCertificateReferences(new LinkedList<>(certificateReferences)); } this.parentBatchClient.protocolLayer().pools().patch(poolId, param, options); }
[ "public", "void", "patchPool", "(", "String", "poolId", ",", "StartTask", "startTask", ",", "Collection", "<", "CertificateReference", ">", "certificateReferences", ",", "Collection", "<", "ApplicationPackageReference", ">", "applicationPackageReferences", ",", "Collectio...
Updates the specified pool. This method only replaces the properties specified with non-null values. @param poolId The ID of the pool. @param startTask A task to run on each compute node as it joins the pool. If null, any existing start task is left unchanged. @param certificateReferences A collection of certificates to be installed on each compute node in the pool. If null, any existing certificate references are left unchanged. @param applicationPackageReferences A collection of application packages to be installed on each compute node in the pool. If null, any existing application packages references are left unchanged. @param metadata A collection of name-value pairs associated with the pool as metadata. If null, any existing metadata is left unchanged. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Updates", "the", "specified", "pool", ".", "This", "method", "only", "replaces", "the", "properties", "specified", "with", "non", "-", "null", "values", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L1225-L1244
train
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.getAllPoolsLifetimeStatistics
public PoolStatistics getAllPoolsLifetimeStatistics(Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolGetAllLifetimeStatisticsOptions options = new PoolGetAllLifetimeStatisticsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); return this.parentBatchClient.protocolLayer().pools().getAllLifetimeStatistics(options); }
java
public PoolStatistics getAllPoolsLifetimeStatistics(Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolGetAllLifetimeStatisticsOptions options = new PoolGetAllLifetimeStatisticsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); return this.parentBatchClient.protocolLayer().pools().getAllLifetimeStatistics(options); }
[ "public", "PoolStatistics", "getAllPoolsLifetimeStatistics", "(", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolGetAllLifetimeStatisticsOptions", "options", "=", "new", "PoolGetAllLifetime...
Gets lifetime summary statistics for all of the pools in the current account. Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @return The aggregated pool statistics. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in serialization/deserialization of data sent to/received from the Batch service.
[ "Gets", "lifetime", "summary", "statistics", "for", "all", "of", "the", "pools", "in", "the", "current", "account", ".", "Statistics", "are", "aggregated", "across", "all", "pools", "that", "have", "ever", "existed", "in", "the", "account", "from", "account", ...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L1360-L1367
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java
AccessPolicy.create
public static EntityCreateOperation<AccessPolicyInfo> create(String name, double durationInMinutes, EnumSet<AccessPolicyPermission> permissions) { return new Creator(name, durationInMinutes, permissions); }
java
public static EntityCreateOperation<AccessPolicyInfo> create(String name, double durationInMinutes, EnumSet<AccessPolicyPermission> permissions) { return new Creator(name, durationInMinutes, permissions); }
[ "public", "static", "EntityCreateOperation", "<", "AccessPolicyInfo", ">", "create", "(", "String", "name", ",", "double", "durationInMinutes", ",", "EnumSet", "<", "AccessPolicyPermission", ">", "permissions", ")", "{", "return", "new", "Creator", "(", "name", ",...
Creates an operation to create a new access policy @param name name of the access policy @param durationInMinutes how long the access policy will be in force @param permissions permissions allowed by this access policy @return The operation
[ "Creates", "an", "operation", "to", "create", "a", "new", "access", "policy" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java#L52-L56
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java
AccessPolicy.get
public static EntityGetOperation<AccessPolicyInfo> get(String accessPolicyId) { return new DefaultGetOperation<AccessPolicyInfo>(ENTITY_SET, accessPolicyId, AccessPolicyInfo.class); }
java
public static EntityGetOperation<AccessPolicyInfo> get(String accessPolicyId) { return new DefaultGetOperation<AccessPolicyInfo>(ENTITY_SET, accessPolicyId, AccessPolicyInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "AccessPolicyInfo", ">", "get", "(", "String", "accessPolicyId", ")", "{", "return", "new", "DefaultGetOperation", "<", "AccessPolicyInfo", ">", "(", "ENTITY_SET", ",", "accessPolicyId", ",", "AccessPolicyInfo", ".", "c...
Create an operation that will retrieve the given access policy @param accessPolicyId id of access policy to retrieve @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "given", "access", "policy" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java#L94-L97
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java
AccessPolicy.get
public static EntityGetOperation<AccessPolicyInfo> get( LinkInfo<AccessPolicyInfo> link) { return new DefaultGetOperation<AccessPolicyInfo>(link.getHref(), AccessPolicyInfo.class); }
java
public static EntityGetOperation<AccessPolicyInfo> get( LinkInfo<AccessPolicyInfo> link) { return new DefaultGetOperation<AccessPolicyInfo>(link.getHref(), AccessPolicyInfo.class); }
[ "public", "static", "EntityGetOperation", "<", "AccessPolicyInfo", ">", "get", "(", "LinkInfo", "<", "AccessPolicyInfo", ">", "link", ")", "{", "return", "new", "DefaultGetOperation", "<", "AccessPolicyInfo", ">", "(", "link", ".", "getHref", "(", ")", ",", "A...
Create an operation that will retrieve the access policy at the given link @param link the link @return the operation
[ "Create", "an", "operation", "that", "will", "retrieve", "the", "access", "policy", "at", "the", "given", "link" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/AccessPolicy.java#L107-L111
train
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java
ContentKeyInfo.getContentKeyType
public ContentKeyType getContentKeyType() { Integer contentKeyTypeInteger = getContent().getContentKeyType(); ContentKeyType contentKeyType = null; if (contentKeyTypeInteger != null) { contentKeyType = ContentKeyType.fromCode(contentKeyTypeInteger); } return contentKeyType; }
java
public ContentKeyType getContentKeyType() { Integer contentKeyTypeInteger = getContent().getContentKeyType(); ContentKeyType contentKeyType = null; if (contentKeyTypeInteger != null) { contentKeyType = ContentKeyType.fromCode(contentKeyTypeInteger); } return contentKeyType; }
[ "public", "ContentKeyType", "getContentKeyType", "(", ")", "{", "Integer", "contentKeyTypeInteger", "=", "getContent", "(", ")", ".", "getContentKeyType", "(", ")", ";", "ContentKeyType", "contentKeyType", "=", "null", ";", "if", "(", "contentKeyTypeInteger", "!=", ...
Gets the content key type. @return the content key type
[ "Gets", "the", "content", "key", "type", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ContentKeyInfo.java#L127-L134
train
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java
ListManagementTermListsImpl.getDetailsAsync
public Observable<TermList> getDetailsAsync(String listId) { return getDetailsWithServiceResponseAsync(listId).map(new Func1<ServiceResponse<TermList>, TermList>() { @Override public TermList call(ServiceResponse<TermList> response) { return response.body(); } }); }
java
public Observable<TermList> getDetailsAsync(String listId) { return getDetailsWithServiceResponseAsync(listId).map(new Func1<ServiceResponse<TermList>, TermList>() { @Override public TermList call(ServiceResponse<TermList> response) { return response.body(); } }); }
[ "public", "Observable", "<", "TermList", ">", "getDetailsAsync", "(", "String", "listId", ")", "{", "return", "getDetailsWithServiceResponseAsync", "(", "listId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponse", "<", "TermList", ">", ",", "TermList"...
Returns list Id details of the term 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 TermList object
[ "Returns", "list", "Id", "details", "of", "the", "term", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java#L123-L130
train
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/SecretRestoreParameters.java
SecretRestoreParameters.withSecretBundleBackup
public SecretRestoreParameters withSecretBundleBackup(byte[] secretBundleBackup) { if (secretBundleBackup == null) { this.secretBundleBackup = null; } else { this.secretBundleBackup = Base64Url.encode(secretBundleBackup); } return this; }
java
public SecretRestoreParameters withSecretBundleBackup(byte[] secretBundleBackup) { if (secretBundleBackup == null) { this.secretBundleBackup = null; } else { this.secretBundleBackup = Base64Url.encode(secretBundleBackup); } return this; }
[ "public", "SecretRestoreParameters", "withSecretBundleBackup", "(", "byte", "[", "]", "secretBundleBackup", ")", "{", "if", "(", "secretBundleBackup", "==", "null", ")", "{", "this", ".", "secretBundleBackup", "=", "null", ";", "}", "else", "{", "this", ".", "...
Set the secretBundleBackup value. @param secretBundleBackup the secretBundleBackup value to set @return the SecretRestoreParameters object itself.
[ "Set", "the", "secretBundleBackup", "value", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/SecretRestoreParameters.java#L38-L45
train
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerAutomaticTuningsInner.java
ServerAutomaticTuningsInner.getAsync
public Observable<ServerAutomaticTuningInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerAutomaticTuningInner>, ServerAutomaticTuningInner>() { @Override public ServerAutomaticTuningInner call(ServiceResponse<ServerAutomaticTuningInner> response) { return response.body(); } }); }
java
public Observable<ServerAutomaticTuningInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerAutomaticTuningInner>, ServerAutomaticTuningInner>() { @Override public ServerAutomaticTuningInner call(ServiceResponse<ServerAutomaticTuningInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "ServerAutomaticTuningInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", "new", ...
Retrieves server automatic tuning options. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ServerAutomaticTuningInner object
[ "Retrieves", "server", "automatic", "tuning", "options", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerAutomaticTuningsInner.java#L102-L109
train
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java
ServerTableAuditingPoliciesInner.getAsync
public Observable<ServerTableAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerTableAuditingPolicyInner>, ServerTableAuditingPolicyInner>() { @Override public ServerTableAuditingPolicyInner call(ServiceResponse<ServerTableAuditingPolicyInner> response) { return response.body(); } }); }
java
public Observable<ServerTableAuditingPolicyInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerTableAuditingPolicyInner>, ServerTableAuditingPolicyInner>() { @Override public ServerTableAuditingPolicyInner call(ServiceResponse<ServerTableAuditingPolicyInner> response) { return response.body(); } }); }
[ "public", "Observable", "<", "ServerTableAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", "new"...
Gets a server's table auditing policy. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ServerTableAuditingPolicyInner object
[ "Gets", "a", "server", "s", "table", "auditing", "policy", ".", "Table", "auditing", "is", "deprecated", "use", "blob", "auditing", "instead", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java#L106-L113
train