_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q29800
RootBeer.checkForRWPaths
train
public boolean checkForRWPaths() { boolean result = false; String[] lines = mountReader(); if (lines == null){ // Could not read, assume false; return false; } for (String line : lines) { // Split lines into parts String[] args...
java
{ "resource": "" }
q29801
RootBeer.checkSuExists
train
public boolean checkSuExists() { Process process = null; try { process = Runtime.getRuntime().exec(new String[] { "which", BINARY_SU }); BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); return in.readLine() != null; } ca...
java
{ "resource": "" }
q29802
BackupLongTermRetentionPoliciesInner.getAsync
train
public Observable<BackupLongTermRetentionPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<BackupLongTermRetentionPolicyInner>, BackupLongTermRetentionPolicyInner...
java
{ "resource": "" }
q29803
MessageSecurityHelper.bytesToBase64Url
train
public static String bytesToBase64Url(byte[] bytes) { String result = (new String(Base64.encodeBase64(bytes), MESSAGE_ENCODING)).replace("=", "").replace("\\", "").replace('+', '-') .replace('/', '_'); return result; }
java
{ "resource": "" }
q29804
MessageSecurityHelper.jsonWebKeyFromString
train
public static JsonWebKey jsonWebKeyFromString(String jwkString) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(jwkString, JsonWebKey.class); }
java
{ "resource": "" }
q29805
MessageSecurityHelper.generateJsonWebKey
train
public static JsonWebKey generateJsonWebKey() { try { final KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); generator.initialize(2048); KeyPair clientRsaKeyPair = generator.generateKeyPair(); JsonWebKey result = JsonWebKey.fromRSA(clientRsaKeyPai...
java
{ "resource": "" }
q29806
MessageSecurityHelper.getJwkWithPublicKeyOnly
train
public static JsonWebKey getJwkWithPublicKeyOnly(JsonWebKey jwk) { KeyPair publicOnly = jwk.toRSA(false); JsonWebKey jsonkeyPublic = JsonWebKey.fromRSA(publicOnly); jsonkeyPublic.withKid(jwk.kid()); jsonkeyPublic.withKeyOps( Arrays.asList(JsonWebKeyOperation.ENCRYPT, Json...
java
{ "resource": "" }
q29807
DatabaseOperationsInner.listByDatabaseNextAsync
train
public Observable<Page<DatabaseOperationInner>> listByDatabaseNextAsync(final String nextPageLink) { return listByDatabaseNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<DatabaseOperationInner>>, Page<DatabaseOperationInner>>() { @Override ...
java
{ "resource": "" }
q29808
APIKeysInner.listAsync
train
public Observable<List<ApplicationInsightsComponentAPIKeyInner>> listAsync(String resourceGroupName, String resourceName) { return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentAPIKeyInner>>, List<ApplicationInsightsComponentAPIKeyIn...
java
{ "resource": "" }
q29809
CertificateItem.withX509Thumbprint
train
public CertificateItem withX509Thumbprint(byte[] x509Thumbprint) { if (x509Thumbprint == null) { this.x509Thumbprint = null; } else { this.x509Thumbprint = Base64Url.encode(x509Thumbprint); } return this; }
java
{ "resource": "" }
q29810
SubnetsInner.beginDelete
train
public void beginDelete(String resourceGroupName, String virtualNetworkName, String subnetName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); }
java
{ "resource": "" }
q29811
ServiceEndpointPoliciesInner.beginDelete
train
public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName) { beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body(); }
java
{ "resource": "" }
q29812
ProtectionKey.getProtectionKeyId
train
public static EntityTypeActionOperation<String> getProtectionKeyId( ContentKeyType contentKeyType) { return new GetProtectionKeyIdActionOperation("GetProtectionKeyId") .addQueryParameter("contentKeyType", String.format("%d", contentKeyType.getCode())) ...
java
{ "resource": "" }
q29813
ProtectionKey.getProtectionKey
train
public static EntityTypeActionOperation<String> getProtectionKey( String protectionKeyId) { return new GetProtectionKeyActionOperation("GetProtectionKey") .addQueryParameter("ProtectionKeyId", String.format("'%s'", protectionKeyId)).setAcceptType( ...
java
{ "resource": "" }
q29814
ServersInner.beginUpdateAsync
train
public Observable<ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, ServerUpdateParameters parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() { @Override p...
java
{ "resource": "" }
q29815
ServersInner.listByResourceGroupAsync
train
public Observable<Page<ServerInner>> listByResourceGroupAsync(String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<ServerInner>>, Page<ServerInner>>() { @Override public Page<ServerInner> call(ServiceResponse...
java
{ "resource": "" }
q29816
SnapshotsInner.delete
train
public void delete(String resourceGroupName, String snapshotName) { deleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().last().body(); }
java
{ "resource": "" }
q29817
SnapshotsInner.beginGrantAccessAsync
train
public ServiceFuture<AccessUriInner> beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback<AccessUriInner> serviceCallback) { return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAcc...
java
{ "resource": "" }
q29818
UsersInner.getAsync
train
public Observable<UserInner> getAsync(String deviceName, String name, String resourceGroupName) { return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<UserInner>, UserInner>() { @Override public UserInner call(ServiceResponse<UserInner> re...
java
{ "resource": "" }
q29819
TransactionContext.commit
train
public void commit() throws ServiceBusException, InterruptedException { if (this.messagingFactory == null) { throw new ServiceBusException(false, "MessagingFactory should not be null"); } this.messagingFactory.endTransaction(this, true); }
java
{ "resource": "" }
q29820
TransactionContext.commitAsync
train
public CompletableFuture<Void> commitAsync() { if (this.messagingFactory == null) { CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>(); exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null")); retur...
java
{ "resource": "" }
q29821
TransactionContext.rollback
train
public void rollback() throws ServiceBusException, InterruptedException { if (this.messagingFactory == null) { throw new ServiceBusException(false, "MessagingFactory should not be null"); } this.messagingFactory.endTransaction(this, false); }
java
{ "resource": "" }
q29822
TransactionContext.rollbackAsync
train
public CompletableFuture<Void> rollbackAsync() { if (this.messagingFactory == null) { CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>(); exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null")); ret...
java
{ "resource": "" }
q29823
ClientFactory.createMessageSenderFromEntityPath
train
public static IMessageSender createMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageSenderFromEntityPathAsync(messagingFactory, entityPath)); }
java
{ "resource": "" }
q29824
ClientFactory.createTransferMessageSenderFromEntityPath
train
public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createTransferMessageSenderFromEntityPathAsync(messagingFactory, entityPath, viaE...
java
{ "resource": "" }
q29825
ClientFactory.createMessageSenderFromConnectionStringBuilderAsync
train
public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder) { Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder); return createMessageSenderFromEntityPathAsync(amqpConnectionStringBu...
java
{ "resource": "" }
q29826
ClientFactory.createTransferMessageSenderFromEntityPathAsync
train
public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) { Utils.assertNonNull("messagingFactory", messagingFactory); MessageSender sender = new MessageSender(messagingFactory, viaEntity...
java
{ "resource": "" }
q29827
ClientFactory.createMessageReceiverFromEntityPath
train
public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings)...
java
{ "resource": "" }
q29828
ReplicationsInner.beginDelete
train
public void beginDelete(String resourceGroupName, String registryName, String replicationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, replicationName).toBlocking().single().body(); }
java
{ "resource": "" }
q29829
SwaggerInterfaceParser.methodParser
train
public SwaggerMethodParser methodParser(Method swaggerMethod) { SwaggerMethodParser result = methodParsers.get(swaggerMethod); if (result == null) { result = new SwaggerMethodParser(swaggerMethod, serializer, host()); methodParsers.put(swaggerMethod, result); } re...
java
{ "resource": "" }
q29830
AgentRegistrationInformationsInner.getAsync
train
public Observable<AgentRegistrationInner> getAsync(String resourceGroupName, String automationAccountName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName).map(new Func1<ServiceResponse<AgentRegistrationInner>, AgentRegistrationInner>() { @Override public Ag...
java
{ "resource": "" }
q29831
VirtualMachinesInner.beginRedeployAsync
train
public Observable<OperationStatusResponseInner> beginRedeployAsync(String resourceGroupName, String vmName) { return beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override p...
java
{ "resource": "" }
q29832
PercentEscaper.escape
train
public String escape(String original) { StringBuilder output = new StringBuilder(); for (int i = 0; i != utf16ToAscii(original).length(); i++) { char c = original.charAt(i); if (c == ' ') { output.append(usePlusForSpace ? "+" : HEX[' ']); } else if (c ...
java
{ "resource": "" }
q29833
NetworkInterfacesInner.delete
train
public void delete(String resourceGroupName, String networkInterfaceName) { deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); }
java
{ "resource": "" }
q29834
UrlBuilder.withHost
train
public UrlBuilder withHost(String host) { if (host == null || host.isEmpty()) { this.host = null; } else { with(host, UrlTokenizerState.SCHEME_OR_HOST); } return this; }
java
{ "resource": "" }
q29835
UrlBuilder.withPort
train
public UrlBuilder withPort(String port) { if (port == null || port.isEmpty()) { this.port = null; } else { with(port, UrlTokenizerState.PORT); } return this; }
java
{ "resource": "" }
q29836
UrlBuilder.withPath
train
public UrlBuilder withPath(String path) { if (path == null || path.isEmpty()) { this.path = null; } else { with(path, UrlTokenizerState.PATH); } return this; }
java
{ "resource": "" }
q29837
UrlBuilder.setQueryParameter
train
public UrlBuilder setQueryParameter(String queryParameterName, String queryParameterEncodedValue) { query.put(queryParameterName, queryParameterEncodedValue); return this; }
java
{ "resource": "" }
q29838
UrlBuilder.withQuery
train
public UrlBuilder withQuery(String query) { if (query == null || query.isEmpty()) { this.query.clear(); } else { with(query, UrlTokenizerState.QUERY); } return this; }
java
{ "resource": "" }
q29839
UrlBuilder.parse
train
public static UrlBuilder parse(String url) { final UrlBuilder result = new UrlBuilder(); result.with(url, UrlTokenizerState.SCHEME_OR_HOST); return result; }
java
{ "resource": "" }
q29840
UrlBuilder.parse
train
public static UrlBuilder parse(URL url) { final UrlBuilder result = new UrlBuilder(); if (url != null) { final String protocol = url.getProtocol(); if (protocol != null && !protocol.isEmpty()) { result.withScheme(protocol); } final String...
java
{ "resource": "" }
q29841
KeyVaultCredentials.buildEmptyRequest
train
private Request buildEmptyRequest(Request request) { RequestBody body = RequestBody.create(MediaType.parse("application/json"), "{}"); if (request.method().equalsIgnoreCase("get")) { return request; } else { return request.newBuilder().method(request.method(), body).build...
java
{ "resource": "" }
q29842
KeyVaultCredentials.supportsMessageProtection
train
private Boolean supportsMessageProtection(String url, Map<String, String> challengeMap) { if (!"true".equals(challengeMap.get("supportspop"))) { return false; } // Message protection is enabled only for subset of keys operations. if (!url.toLowerCase().contains("/keys/")) {...
java
{ "resource": "" }
q29843
KeyVaultCredentials.getAuthenticationCredentials
train
private AuthenticationResult getAuthenticationCredentials(Boolean supportsPop, Map<String, String> challengeMap) { String authorization = challengeMap.get("authorization"); if (authorization == null) { authorization = challengeMap.get("authorization_uri"); } String resource...
java
{ "resource": "" }
q29844
KeyVaultCredentials.extractChallenge
train
private static Map<String, String> extractChallenge(String authenticateHeader, String authChallengePrefix) { if (!isValidChallenge(authenticateHeader, authChallengePrefix)) { return null; } authenticateHeader = authenticateHeader.toLowerCase().replace(authChallengePrefix.toLowerCase...
java
{ "resource": "" }
q29845
KeyVaultCredentials.isValidChallenge
train
private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) { if (authenticateHeader != null && !authenticateHeader.isEmpty() && authenticateHeader.toLowerCase().startsWith(authChallengePrefix.toLowerCase())) { return true; } return ...
java
{ "resource": "" }
q29846
KeyVaultCredentials.doAuthenticate
train
public AuthenticationResult doAuthenticate(String authorization, String resource, String scope, String schema) { return new AuthenticationResult(doAuthenticate(authorization, resource, scope), ""); }
java
{ "resource": "" }
q29847
ODataAtomUnmarshaller.unmarshalFeed
train
@SuppressWarnings("rawtypes") public <T extends ODataEntity> ListResult<T> unmarshalFeed( InputStream stream, Class<T> contentType) throws JAXBException, ServiceException { validateNotNull(stream, "stream"); validateNotNull(contentType, "contentType"); List<T> entrie...
java
{ "resource": "" }
q29848
ODataAtomUnmarshaller.unmarshalEntry
train
@SuppressWarnings("rawtypes") public <T extends ODataEntity> T unmarshalEntry(InputStream stream, Class<T> contentType) throws JAXBException, ServiceException { validateNotNull(stream, "stream"); validateNotNull(contentType, "contentType"); Class<?> marshallingContentType = getM...
java
{ "resource": "" }
q29849
RegistriesInner.checkNameAvailabilityAsync
train
public Observable<RegistryNameStatusInner> checkNameAvailabilityAsync(String name) { return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1<ServiceResponse<RegistryNameStatusInner>, RegistryNameStatusInner>() { @Override public RegistryNameStatusInner call(ServiceRespon...
java
{ "resource": "" }
q29850
RegistriesInner.delete
train
public void delete(String resourceGroupName, String registryName) { deleteWithServiceResponseAsync(resourceGroupName, registryName).toBlocking().single().body(); }
java
{ "resource": "" }
q29851
DatabasesInner.listByServerAsync
train
public Observable<List<DatabaseInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<DatabaseInner>>, List<DatabaseInner>>() { @Override public List<DatabaseIn...
java
{ "resource": "" }
q29852
JWEHeader.deserialize
train
public static JWEHeader deserialize(String json) throws IOException { ObjectMapper mapper = new ObjectMapper(); return mapper.readValue(json, JWEHeader.class); }
java
{ "resource": "" }
q29853
JWEHeader.fromBase64String
train
public static JWEHeader fromBase64String(String base64) throws IOException { String json = MessageSecurityHelper.base64UrltoString(base64); return deserialize(json); }
java
{ "resource": "" }
q29854
AccountsInner.getByResourceGroupAsync
train
public Observable<CognitiveServicesAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<CognitiveServicesAccountInner>, CognitiveServicesAccountInner>() { ...
java
{ "resource": "" }
q29855
HttpHeaders.value
train
public String value(String name) { final HttpHeader header = getHeader(name); return header == null ? null : header.value(); }
java
{ "resource": "" }
q29856
HttpHeaders.values
train
public String[] values(String name) { final HttpHeader header = getHeader(name); return header == null ? null : header.values(); }
java
{ "resource": "" }
q29857
BackupResourceVaultConfigsInner.getAsync
train
public Observable<BackupResourceVaultConfigResourceInner> getAsync(String vaultName, String resourceGroupName) { return getWithServiceResponseAsync(vaultName, resourceGroupName).map(new Func1<ServiceResponse<BackupResourceVaultConfigResourceInner>, BackupResourceVaultConfigResourceInner>() { @Overri...
java
{ "resource": "" }
q29858
SystemEventTypeMappings.containsMappingFor
train
@Beta public static boolean containsMappingFor(final String eventType) { if (eventType == null || eventType.isEmpty()) { return false; } else { return systemEventMappings.containsKey(canonicalizeEventType(eventType)); } }
java
{ "resource": "" }
q29859
SystemEventTypeMappings.getMapping
train
@Beta public static Type getMapping(final String eventType) { if (!containsMappingFor(eventType)) { return null; } else { return systemEventMappings.get(canonicalizeEventType(eventType)); } }
java
{ "resource": "" }
q29860
ConfigurationsInner.listByServerAsync
train
public Observable<List<ConfigurationInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ConfigurationInner>>, List<ConfigurationInner>>() { @Override public ...
java
{ "resource": "" }
q29861
ScriptActionsInner.delete
train
public void delete(String resourceGroupName, String clusterName, String scriptName) { deleteWithServiceResponseAsync(resourceGroupName, clusterName, scriptName).toBlocking().single().body(); }
java
{ "resource": "" }
q29862
NotificationHubsInner.delete
train
public void delete(String resourceGroupName, String namespaceName, String notificationHubName) { deleteWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName).toBlocking().single().body(); }
java
{ "resource": "" }
q29863
KeyRestoreParameters.withKeyBundleBackup
train
public KeyRestoreParameters withKeyBundleBackup(byte[] keyBundleBackup) { if (keyBundleBackup == null) { this.keyBundleBackup = null; } else { this.keyBundleBackup = Base64Url.encode(keyBundleBackup); } return this; }
java
{ "resource": "" }
q29864
ConnectionMonitorsInner.delete
train
public void delete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); }
java
{ "resource": "" }
q29865
PartnersInner.listByIntegrationAccountsNextAsync
train
public Observable<Page<IntegrationAccountPartnerInner>> listByIntegrationAccountsNextAsync(final String nextPageLink) { return listByIntegrationAccountsNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<IntegrationAccountPartnerInner>>, Page<IntegrationAccountPartnerInner...
java
{ "resource": "" }
q29866
JobsInner.listByAgentNextAsync
train
public Observable<Page<JobInner>> listByAgentNextAsync(final String nextPageLink) { return listByAgentNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<JobInner>>, Page<JobInner>>() { @Override public Page<JobInner> call(ServiceResponse<Pa...
java
{ "resource": "" }
q29867
TransparentDataEncryptionsInner.getAsync
train
public Observable<TransparentDataEncryptionInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<TransparentDataEncryptionInner>, TransparentDataEncryptionInner>() { ...
java
{ "resource": "" }
q29868
DatabaseAutomaticTuningsInner.getAsync
train
public Observable<DatabaseAutomaticTuningInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseAutomaticTuningInner>, DatabaseAutomaticTuningInner>() { ...
java
{ "resource": "" }
q29869
NetworkProfilesInner.delete
train
public void delete(String resourceGroupName, String networkProfileName) { deleteWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().last().body(); }
java
{ "resource": "" }
q29870
EventSubscriptionsInner.listByResourceGroupAsync
train
public Observable<Page<EventSubscriptionInner>> listByResourceGroupAsync(String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<EventSubscriptionInner>>, Page<EventSubscriptionInner>>() { @Override public Page<...
java
{ "resource": "" }
q29871
ComponentFeatureCapabilitiesInner.getAsync
train
public Observable<ApplicationInsightsComponentFeatureCapabilitiesInner> getAsync(String resourceGroupName, String resourceName) { return getWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<ApplicationInsightsComponentFeatureCapabilitiesInner>, ApplicationInsightsComponentF...
java
{ "resource": "" }
q29872
VirtualNetworksInner.delete
train
public void delete(String resourceGroupName, String virtualNetworkName) { deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().last().body(); }
java
{ "resource": "" }
q29873
ControllersInner.getByResourceGroupAsync
train
public Observable<ControllerInner> getByResourceGroupAsync(String resourceGroupName, String name) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<ControllerInner>, ControllerInner>() { @Override public ControllerInner call(Servic...
java
{ "resource": "" }
q29874
MediaservicesInner.syncStorageKeysAsync
train
public Observable<Void> syncStorageKeysAsync(String resourceGroupName, String accountName) { return syncStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { ...
java
{ "resource": "" }
q29875
AssetFile.createFileInfos
train
public static EntityActionOperation createFileInfos(String assetId) { String encodedId; try { encodedId = URLEncoder.encode(assetId, "UTF-8"); } catch (UnsupportedEncodingException ex) { // This can never happen unless JVM is broken throw new RuntimeException(...
java
{ "resource": "" }
q29876
AssetFile.get
train
public static EntityGetOperation<AssetFileInfo> get(String assetFileId) { return new DefaultGetOperation<AssetFileInfo>(ENTITY_SET, assetFileId, AssetFileInfo.class); }
java
{ "resource": "" }
q29877
AssetFile.list
train
public static DefaultListOperation<AssetFileInfo> list( LinkInfo<AssetFileInfo> link) { return new DefaultListOperation<AssetFileInfo>(link.getHref(), new GenericType<ListResult<AssetFileInfo>>() { }); }
java
{ "resource": "" }
q29878
LabsInner.beginDelete
train
public void beginDelete(String resourceGroupName, String labAccountName, String labName) { beginDeleteWithServiceResponseAsync(resourceGroupName, labAccountName, labName).toBlocking().single().body(); }
java
{ "resource": "" }
q29879
DatabaseVulnerabilityAssessmentsInner.getAsync
train
public Observable<DatabaseVulnerabilityAssessmentInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseVulnerabilityAssessmentInner>, DatabaseVulnerabilityAssessmen...
java
{ "resource": "" }
q29880
DatabaseVulnerabilityAssessmentsInner.createOrUpdateAsync
train
public Observable<DatabaseVulnerabilityAssessmentInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseVulnerabilityAssessmentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<Se...
java
{ "resource": "" }
q29881
DatabaseVulnerabilityAssessmentsInner.listByDatabaseNextAsync
train
public Observable<Page<DatabaseVulnerabilityAssessmentInner>> listByDatabaseNextAsync(final String nextPageLink) { return listByDatabaseNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<DatabaseVulnerabilityAssessmentInner>>, Page<DatabaseVulnerabilityAssessmentInner>>()...
java
{ "resource": "" }
q29882
AzureAsyncOperationPollStrategy.tryToCreate
train
static PollStrategy tryToCreate(RestProxy restProxy, SwaggerMethodParser methodParser, HttpRequest originalHttpRequest, HttpResponse httpResponse, long delayInMilliseconds) { String urlHeader = getHeader(httpResponse); URL azureAsyncOperationUrl = null; if (urlHeader != null) { try {...
java
{ "resource": "" }
q29883
AppsInner.getByResourceGroupAsync
train
public Observable<AppInner> getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<AppInner>, AppInner>() { @Override public AppInner call(ServiceResponse<Ap...
java
{ "resource": "" }
q29884
AppsInner.beginDelete
train
public void beginDelete(String resourceGroupName, String resourceName) { beginDeleteWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); }
java
{ "resource": "" }
q29885
VpnGatewaysInner.delete
train
public void delete(String resourceGroupName, String gatewayName) { deleteWithServiceResponseAsync(resourceGroupName, gatewayName).toBlocking().last().body(); }
java
{ "resource": "" }
q29886
SettingSelector.acceptDatetime
train
public SettingSelector acceptDatetime(OffsetDateTime datetime) { this.acceptDatetime = DateTimeFormatter.RFC_1123_DATE_TIME.toFormat().format(datetime); return this; }
java
{ "resource": "" }
q29887
ApplicationOperations.getApplication
train
public ApplicationSummary getApplication(String applicationId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { ApplicationGetOptions options = new ApplicationGetOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors...
java
{ "resource": "" }
q29888
DeploymentsInner.checkExistence
train
public boolean checkExistence(String resourceGroupName, String deploymentName) { return checkExistenceWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().single().body(); }
java
{ "resource": "" }
q29889
ObjectIdentifier.verifyNonEmpty
train
protected static String verifyNonEmpty(String value, String argName) { if (value != null) { value = value.trim(); if (value.isEmpty()) { value = null; } } if (value == null) { throw new IllegalArgumentException(argName); } ...
java
{ "resource": "" }
q29890
ObjectIdentifier.getFullAuthority
train
protected String getFullAuthority(URI uri) { String authority = uri.getAuthority(); if (!authority.contains(":") && uri.getPort() > 0) { // Append port for complete authority authority = String.format("%s:%d", uri.getAuthority(), uri.getPort()); } return authority...
java
{ "resource": "" }
q29891
LiveOutputsInner.beginDelete
train
public void beginDelete(String resourceGroupName, String accountName, String liveEventName, String liveOutputName) { beginDeleteWithServiceResponseAsync(resourceGroupName, accountName, liveEventName, liveOutputName).toBlocking().single().body(); }
java
{ "resource": "" }
q29892
ElasticPoolOperationsInner.cancel
train
public void cancel(String resourceGroupName, String serverName, String elasticPoolName, UUID operationId) { cancelWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, operationId).toBlocking().single().body(); }
java
{ "resource": "" }
q29893
RouteTablesInner.beginDelete
train
public void beginDelete(String resourceGroupName, String routeTableName) { beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); }
java
{ "resource": "" }
q29894
RunbooksInner.getContentAsync
train
public ServiceFuture<String> getContentAsync(String resourceGroupName, String automationAccountName, String runbookName, final ServiceCallback<String> serviceCallback) { return ServiceFuture.fromResponse(getContentWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName), serviceCallback);...
java
{ "resource": "" }
q29895
RunbooksInner.getAsync
train
public Observable<RunbookInner> getAsync(String resourceGroupName, String automationAccountName, String runbookName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).map(new Func1<ServiceResponse<RunbookInner>, RunbookInner>() { @Override public...
java
{ "resource": "" }
q29896
ReactorNettyClient.bodySendDelegate
train
private static BiFunction<HttpClientRequest, NettyOutbound, Publisher<Void>> bodySendDelegate(final HttpRequest restRequest) { BiFunction<HttpClientRequest, NettyOutbound, Publisher<Void>> sendDelegate = (reactorNettyRequest, reactorNettyOutbound) -> { for (HttpHeader header : restRequest.headers())...
java
{ "resource": "" }
q29897
ReactorNettyClient.responseDelegate
train
private static BiFunction<HttpClientResponse, Connection, Publisher<HttpResponse>> responseDelegate(final HttpRequest restRequest) { return (reactorNettyResponse, reactorNettyConnection) -> Mono.just(new ReactorNettyHttpResponse(reactorNettyResponse, reactorNettyConnection).withRequest(restRequest))...
java
{ "resource": "" }
q29898
AccountsInner.getByResourceGroupAsync
train
public Observable<DataLakeAnalyticsAccountInner> getByResourceGroupAsync(String resourceGroupName, String accountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<DataLakeAnalyticsAccountInner>, DataLakeAnalyticsAccountInner>() { ...
java
{ "resource": "" }
q29899
LoggingUtils.unwrapException
train
static Throwable unwrapException(Throwable wrapped, StringBuilder outAction) { Throwable unwrapped = wrapped; while ((unwrapped instanceof ExecutionException) || (unwrapped instanceof CompletionException) || (unwrapped instanceof ExceptionWithAction)) { if ((unwrapped instan...
java
{ "resource": "" }