idx
int64
0
41.2k
question
stringlengths
74
4.21k
target
stringlengths
5
888
28,500
public Mono < HttpResponse > send ( HttpRequest request , ContextData contextData ) { return httpPipeline . send ( httpPipeline . newContext ( request , contextData ) ) ; }
Send the provided request asynchronously applying any request policies provided to the HttpClient instance .
28,501
public final Object handleRestReturnType ( Mono < HttpDecodedResponse > asyncHttpDecodedResponse , final SwaggerMethodParser methodParser , final Type returnType ) { final Mono < HttpDecodedResponse > asyncExpectedResponse = ensureExpectedStatus ( asyncHttpDecodedResponse , methodParser ) ; final Object result ; if ( T...
Handle the provided asynchronous HTTP response and return the deserialized value .
28,502
public void incrementRetryCount ( String clientId ) { Integer retryCount = this . retryCounts . get ( clientId ) ; this . retryCounts . put ( clientId , retryCount == null ? 1 : retryCount + 1 ) ; }
Increments the number of successive retry attempts made by a client .
28,503
public void resetRetryCount ( String clientId ) { Integer currentRetryCount = this . retryCounts . get ( clientId ) ; if ( currentRetryCount != null && currentRetryCount . intValue ( ) != 0 ) { this . retryCounts . put ( clientId , 0 ) ; } }
Resets the number of retry attempts made by a client . This method is called by the client when retried operation succeeds .
28,504
public static boolean isRetryableException ( Exception exception ) { if ( exception == null ) { throw new IllegalArgumentException ( "exception cannot be null" ) ; } if ( exception instanceof ServiceBusException ) { return ( ( ServiceBusException ) exception ) . getIsTransient ( ) ; } return false ; }
Determines if an exception is retry - able or not . Only transient exceptions should be retried .
28,505
public static RetryPolicy getDefault ( ) { return new RetryExponential ( ClientConstants . DEFAULT_RERTRY_MIN_BACKOFF , ClientConstants . DEFAULT_RERTRY_MAX_BACKOFF , ClientConstants . DEFAULT_MAX_RETRY_COUNT , ClientConstants . DEFAULT_RETRY ) ; }
Retry policy that provides exponentially increasing retry intervals with each successive failure . This policy is suitable for use by use most client applications and is also the default policy if no retry policy is specified .
28,506
public static UUID convertDotNetBytesToUUID ( byte [ ] dotNetBytes ) { if ( dotNetBytes == null || dotNetBytes . length != GUIDSIZE ) { return new UUID ( 0l , 0l ) ; } byte [ ] reOrderedBytes = new byte [ GUIDSIZE ] ; for ( int i = 0 ; i < GUIDSIZE ; i ++ ) { int indexInReorderedBytes ; switch ( i ) { case 0 : indexInR...
First 4 bytes are in reverse order 5th and 6th bytes are in reverse order 7th and 8th bytes are also in reverse order
28,507
public static int getDataSerializedSize ( Message amqpMessage ) { if ( amqpMessage == null ) { return 0 ; } int payloadSize = getPayloadSize ( amqpMessage ) ; MessageAnnotations messageAnnotations = amqpMessage . getMessageAnnotations ( ) ; ApplicationProperties applicationProperties = amqpMessage . getApplicationPrope...
Remove this .. Too many cases too many types ...
28,508
static Message readMessageFromDelivery ( Receiver receiveLink , Delivery delivery ) { int msgSize = delivery . pending ( ) ; byte [ ] buffer = new byte [ msgSize ] ; int read = receiveLink . recv ( buffer , 0 , msgSize ) ; Message message = Proton . message ( ) ; message . decode ( buffer , 0 , read ) ; return message ...
This is not super stable for some reason
28,509
public void delete ( String resourceGroupName , String resourceName , ItemScopePath scopePath ) { deleteWithServiceResponseAsync ( resourceGroupName , resourceName , scopePath ) . toBlocking ( ) . single ( ) . body ( ) ; }
Deletes a specific Analytics Items defined within an Application Insights component .
28,510
public JobInfo addJobNotificationSubscription ( JobNotificationSubscription jobNotificationSubscription ) { getContent ( ) . addJobNotificationSubscriptionType ( new JobNotificationSubscriptionType ( ) . setNotificationEndPointId ( jobNotificationSubscription . getNotificationEndPointId ( ) ) . setTargetJobState ( jobN...
Adds the job notification subscription .
28,511
public Observable < ServerInner > beginCreateOrUpdateAsync ( String resourceGroupName , String serverName , ServerInner parameters ) { return beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerInner > , ServerInner > ( ) { public Serve...
Creates or updates a server .
28,512
@ JsonProperty ( "n" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] n ( ) { return ByteExtensions . clone ( this . n ) ; }
Get the n value .
28,513
@ JsonProperty ( "e" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] e ( ) { return ByteExtensions . clone ( this . e ) ; }
Get the e value .
28,514
@ JsonProperty ( "d" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] d ( ) { return ByteExtensions . clone ( this . d ) ; }
Get the d value .
28,515
@ JsonProperty ( "p" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] p ( ) { return ByteExtensions . clone ( this . p ) ; }
Get the RSA secret prime value .
28,516
@ JsonProperty ( "q" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] q ( ) { return ByteExtensions . clone ( this . q ) ; }
Get RSA secret prime with p &lt ; q value .
28,517
@ JsonProperty ( "k" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] k ( ) { return ByteExtensions . clone ( this . k ) ; }
Get Symmetric key value .
28,518
@ JsonProperty ( "key_hsm" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] t ( ) { return ByteExtensions . clone ( this . t ) ; }
Get HSM Token value used with Bring Your Own Key .
28,519
@ JsonProperty ( "x" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] x ( ) { return ByteExtensions . clone ( this . x ) ; }
Get the x value .
28,520
@ JsonProperty ( "y" ) @ JsonSerialize ( using = Base64UrlJsonSerializer . class ) @ JsonDeserialize ( using = Base64UrlJsonDeserializer . class ) public byte [ ] y ( ) { return ByteExtensions . clone ( this . y ) ; }
Get the y value .
28,521
private RSAPrivateKeySpec getRSAPrivateKeySpec ( ) { return new RSAPrivateCrtKeySpec ( toBigInteger ( n ) , toBigInteger ( e ) , toBigInteger ( d ) , toBigInteger ( p ) , toBigInteger ( q ) , toBigInteger ( dp ) , toBigInteger ( dq ) , toBigInteger ( qi ) ) ; }
Get the RSA private key spec value .
28,522
private PublicKey getRSAPublicKey ( Provider provider ) { try { RSAPublicKeySpec publicKeySpec = getRSAPublicKeySpec ( ) ; KeyFactory factory = provider != null ? KeyFactory . getInstance ( "RSA" , provider ) : KeyFactory . getInstance ( "RSA" ) ; return factory . generatePublic ( publicKeySpec ) ; } catch ( GeneralSec...
Get the RSA public key value .
28,523
private PrivateKey getRSAPrivateKey ( Provider provider ) { try { RSAPrivateKeySpec privateKeySpec = getRSAPrivateKeySpec ( ) ; KeyFactory factory = provider != null ? KeyFactory . getInstance ( "RSA" , provider ) : KeyFactory . getInstance ( "RSA" ) ; return factory . generatePrivate ( privateKeySpec ) ; } catch ( Gen...
Get the RSA private key value .
28,524
private void checkRSACompatible ( ) { if ( ! JsonWebKeyType . RSA . equals ( kty ) && ! JsonWebKeyType . RSA_HSM . equals ( kty ) ) { throw new UnsupportedOperationException ( "Not an RSA key" ) ; } }
Verifies if the key is an RSA key .
28,525
public static JsonWebKey fromRSA ( KeyPair keyPair ) { RSAPrivateCrtKey privateKey = ( RSAPrivateCrtKey ) keyPair . getPrivate ( ) ; JsonWebKey key = null ; if ( privateKey != null ) { key = new JsonWebKey ( ) . withKty ( JsonWebKeyType . RSA ) . withN ( toByteArray ( privateKey . getModulus ( ) ) ) . withE ( toByteArr...
Converts RSA key pair to JSON web key .
28,526
public KeyPair toRSA ( boolean includePrivateParameters , Provider provider ) { checkRSACompatible ( ) ; if ( includePrivateParameters ) { return new KeyPair ( getRSAPublicKey ( provider ) , getRSAPrivateKey ( provider ) ) ; } else { return new KeyPair ( getRSAPublicKey ( provider ) , null ) ; } }
Converts JSON web key to RSA key pair and include the private key if set to true .
28,527
public static JsonWebKey fromEC ( KeyPair keyPair , Provider provider ) { ECPublicKey apub = ( ECPublicKey ) keyPair . getPublic ( ) ; ECPoint point = apub . getW ( ) ; ECPrivateKey apriv = ( ECPrivateKey ) keyPair . getPrivate ( ) ; if ( apriv != null ) { return new JsonWebKey ( ) . withKty ( JsonWebKeyType . EC ) . w...
Converts EC key pair to JSON web key .
28,528
private static JsonWebKeyCurveName getCurveFromKeyPair ( KeyPair keyPair , Provider provider ) { try { ECPublicKey key = ( ECPublicKey ) keyPair . getPublic ( ) ; ECParameterSpec spec = key . getParams ( ) ; EllipticCurve crv = spec . getCurve ( ) ; List < JsonWebKeyCurveName > curveList = Arrays . asList ( JsonWebKeyC...
Matches the curve of the keyPair to supported curves .
28,529
public static JsonWebKey fromAes ( SecretKey secretKey ) { if ( secretKey == null ) { return null ; } return new JsonWebKey ( ) . withK ( secretKey . getEncoded ( ) ) . withKty ( JsonWebKeyType . OCT ) ; }
Converts AES key to JSON web key .
28,530
public SecretKey toAes ( ) { if ( k == null ) { return null ; } SecretKey secretKey = new SecretKeySpec ( k , "AES" ) ; return secretKey ; }
Converts JSON web key to AES key .
28,531
public void clearMemory ( ) { zeroArray ( k ) ; k = null ; zeroArray ( n ) ; n = null ; zeroArray ( e ) ; e = null ; zeroArray ( d ) ; d = null ; zeroArray ( dp ) ; dp = null ; zeroArray ( dq ) ; dq = null ; zeroArray ( qi ) ; qi = null ; zeroArray ( p ) ; p = null ; zeroArray ( q ) ; q = null ; zeroArray ( t ) ; t = n...
Clear key materials .
28,532
public void open ( final OperationResult < Void , Exception > onOpen , final OperationResult < Void , Exception > onClose ) { this . onOpen = onOpen ; this . onClose = onClose ; this . sendLink . open ( ) ; this . receiveLink . open ( ) ; }
open should be called only once - we use FaultTolerantObject for that
28,533
public void close ( final OperationResult < Void , Exception > onGraceFullClose ) { this . onGraceFullClose = onGraceFullClose ; this . sendLink . close ( ) ; this . receiveLink . close ( ) ; }
close should be called exactly once - we use FaultTolerantObject for that
28,534
public void request ( final Message message , final OperationResult < Message , Exception > onResponse ) { if ( message == null ) { throw new IllegalArgumentException ( "message cannot be null" ) ; } if ( message . getMessageId ( ) != null ) { throw new IllegalArgumentException ( "message.getMessageId() should be null"...
& assumes that this is run on Opened Object
28,535
public static MessageBody fromValueData ( Object value ) { if ( value == null ) { throw new IllegalArgumentException ( "Value data is null." ) ; } MessageBody body = new MessageBody ( ) ; body . bodyType = MessageBodyType . VALUE ; body . valueData = value ; body . sequenceData = null ; body . binaryData = null ; retur...
Creates message body of AMQPValue type .
28,536
public static MessageBody fromSequenceData ( List < List < Object > > sequenceData ) { if ( sequenceData == null || sequenceData . size ( ) == 0 || sequenceData . size ( ) > 1 ) { throw new IllegalArgumentException ( "Sequence data is null or has more than one collection in it." ) ; } MessageBody body = new MessageBody...
Creates a message body from a list of AMQPSequence sections . Each AMQPSequence section is in turn a list of objects . Please note that this version of the SDK supports only one AMQPSequence section in a message . It means only a list of exactly one sequence in it is accepted as message body .
28,537
public static MessageBody fromBinaryData ( List < byte [ ] > binaryData ) { if ( binaryData == null || binaryData . size ( ) == 0 || binaryData . size ( ) > 1 ) { throw new IllegalArgumentException ( "Binary data is null or has more than one byte array in it." ) ; } MessageBody body = new MessageBody ( ) ; body . bodyT...
Creates a message body from a list of Data sections . Each Data section is a byte array . Please note that this version of the SDK supports only one Data section in a message . It means only a list of exactly one byte array in it is accepted as message body .
28,538
public Observable < ServerVulnerabilityAssessmentInner > getAsync ( String resourceGroupName , String serverName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < ServerVulnerabilityAssessmentInner > , ServerVulnerabilityAssessmentInner > ( ) { public Server...
Gets the server s vulnerability assessment .
28,539
public Observable < ServerVulnerabilityAssessmentInner > createOrUpdateAsync ( String resourceGroupName , String serverName , ServerVulnerabilityAssessmentInner parameters ) { return createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerVulner...
Creates or updates the server s vulnerability assessment .
28,540
public Observable < Page < WorkflowRunInner > > listNextAsync ( final String nextPageLink ) { return listNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < WorkflowRunInner > > , Page < WorkflowRunInner > > ( ) { public Page < WorkflowRunInner > call ( ServiceResponse < Page < Wo...
Gets a list of workflow runs .
28,541
public Observable < ApplicationInsightsComponentBillingFeaturesInner > getAsync ( String resourceGroupName , String resourceName ) { return getWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < ApplicationInsightsComponentBillingFeaturesInner > , ApplicationInsightsCompo...
Returns current billing features for an Application Insights component .
28,542
public Observable < OperationStatusResponseInner > deleteAsync ( String resourceGroupName , String vmScaleSetName ) { return deleteWithServiceResponseAsync ( resourceGroupName , vmScaleSetName ) . map ( new Func1 < ServiceResponse < OperationStatusResponseInner > , OperationStatusResponseInner > ( ) { public OperationS...
Deletes a VM scale set .
28,543
public List < ContentKeyAuthorizationPolicyRestriction > getRestrictions ( ) { List < ContentKeyAuthorizationPolicyRestriction > result = new ArrayList < ContentKeyAuthorizationPolicyRestriction > ( ) ; List < ContentKeyAuthorizationPolicyRestrictionType > restrictionsTypes = getContent ( ) . getRestrictions ( ) ; if (...
Get the content key authorization policy options restrictions .
28,544
public void delete ( String resourceGroupName , String labAccountName , String galleryImageName ) { deleteWithServiceResponseAsync ( resourceGroupName , labAccountName , galleryImageName ) . toBlocking ( ) . single ( ) . body ( ) ; }
Delete gallery image .
28,545
public Observable < ManagedBackupShortTermRetentionPolicyInner > getAsync ( String resourceGroupName , String managedInstanceName , String databaseName ) { return getWithServiceResponseAsync ( resourceGroupName , managedInstanceName , databaseName ) . map ( new Func1 < ServiceResponse < ManagedBackupShortTermRetentionP...
Gets a managed database s short term retention policy .
28,546
private Duration determineDelayDuration ( HttpResponse response ) { int code = response . statusCode ( ) ; if ( code != HttpResponseStatus . TOO_MANY_REQUESTS . code ( ) && code != HttpResponseStatus . SERVICE_UNAVAILABLE . code ( ) ) { return this . delayDuration ; } String retryHeader = response . headerValue ( RETRY...
Determines the delay duration that should be waited before retrying .
28,547
public void delete ( String personGroupId , UUID personId ) { deleteWithServiceResponseAsync ( personGroupId , personId ) . toBlocking ( ) . single ( ) . body ( ) ; }
Delete an existing person from a person group . Persisted face images of the person will also be deleted .
28,548
public void visitToken ( DetailAST token ) { if ( this . serviceClientClass == null ) { return ; } switch ( token . getType ( ) ) { case TokenTypes . PACKAGE_DEF : this . extendsServiceClient = extendsServiceClient ( token ) ; break ; case TokenTypes . CTOR_DEF : if ( this . extendsServiceClient && visibilityIsPublicOr...
Processes a token from the required tokens list when the TreeWalker visits it .
28,549
private boolean extendsServiceClient ( DetailAST packageDefinitionToken ) { String packageName = FullIdent . createFullIdent ( packageDefinitionToken . findFirstToken ( TokenTypes . DOT ) ) . getText ( ) ; if ( packageName . startsWith ( "com.microsoft" ) ) { return false ; } DetailAST classDefinitionToken = packageDef...
Determines if the class extends ServiceClient .
28,550
private boolean visibilityIsPublicOrProtected ( DetailAST constructorToken ) { DetailAST modifierToken = constructorToken . findFirstToken ( TokenTypes . MODIFIERS ) ; if ( modifierToken == null ) { return false ; } return TokenUtil . findFirstTokenByPredicate ( modifierToken , node -> node . getType ( ) == TokenTypes ...
Checks if the constructor is using the public or protected scope .
28,551
private boolean methodIsStaticBuilder ( DetailAST methodToken ) { DetailAST modifierToken = methodToken . findFirstToken ( TokenTypes . MODIFIERS ) ; if ( modifierToken == null ) { return false ; } if ( modifierToken . findFirstToken ( TokenTypes . LITERAL_STATIC ) == null || modifierToken . findFirstToken ( TokenTypes...
Checks if the method node is public static and named builder .
28,552
public static ScheduledFuture < ? > schedule ( Runnable runnable , Duration runFrequency , TimerType timerType ) { switch ( timerType ) { case OneTimeRun : return executor . schedule ( runnable , runFrequency . toMillis ( ) , TimeUnit . MILLISECONDS ) ; case RepeatRun : return executor . scheduleWithFixedDelay ( runnab...
runFrequency implemented only for TimeUnit granularity - Seconds
28,553
public Observable < RoleInner > getAsync ( String deviceName , String name , String resourceGroupName ) { return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < RoleInner > , RoleInner > ( ) { public RoleInner call ( ServiceResponse < RoleInner > response ) { ...
Gets a specific role by name .
28,554
void initialize ( HostContext hostContext ) throws InvalidKeyException , URISyntaxException , StorageException { this . hostContext = hostContext ; if ( this . storageContainerName == null ) { this . storageContainerName = this . hostContext . getEventHubPath ( ) ; } Pattern p = Pattern . compile ( "^(?-i)(?:[a-z0-9]|(...
hence we don t want it in the constructor .
28,555
public CompletableFuture < Void > createAllLeasesIfNotExists ( List < String > partitionIds ) { CompletableFuture < Void > future = null ; int blobCount = 0 ; try { Iterable < ListBlobItem > leaseBlobs = this . consumerGroupDirectory . listBlobs ( "" , true , null , this . leaseOperationOptions , null ) ; Iterator < Li...
Because it happens during startup when no user code is running it cannot deadlock with checkpointing .
28,556
public Observable < ProviderInner > getAsync ( String resourceProviderNamespace , String expand ) { return getWithServiceResponseAsync ( resourceProviderNamespace , expand ) . map ( new Func1 < ServiceResponse < ProviderInner > , ProviderInner > ( ) { public ProviderInner call ( ServiceResponse < ProviderInner > respon...
Gets the specified resource provider .
28,557
public ServiceFuture < OperationStatusResponseInner > beginRestartAsync ( String resourceGroupName , String vmScaleSetName , String instanceId , final ServiceCallback < OperationStatusResponseInner > serviceCallback ) { return ServiceFuture . fromResponse ( beginRestartWithServiceResponseAsync ( resourceGroupName , vmS...
Restarts a virtual machine in a VM scale set .
28,558
public ServiceFuture < OperationStatusResponseInner > beginStartAsync ( String resourceGroupName , String vmScaleSetName , String instanceId , final ServiceCallback < OperationStatusResponseInner > serviceCallback ) { return ServiceFuture . fromResponse ( beginStartWithServiceResponseAsync ( resourceGroupName , vmScale...
Starts a virtual machine in a VM scale set .
28,559
public ServiceFuture < OperationStatusResponseInner > beginRedeployAsync ( String resourceGroupName , String vmScaleSetName , String instanceId , final ServiceCallback < OperationStatusResponseInner > serviceCallback ) { return ServiceFuture . fromResponse ( beginRedeployWithServiceResponseAsync ( resourceGroupName , v...
Redeploys a virtual machine in a VM scale set .
28,560
public static boolean isCompleted ( String operationState ) { return operationState == null || operationState . length ( ) == 0 || SUCCEEDED . equalsIgnoreCase ( operationState ) || isFailedOrCanceled ( operationState ) ; }
Get whether or not the provided operation state represents a completed state .
28,561
public void delete ( String resourceGroupName , String domainName ) { deleteWithServiceResponseAsync ( resourceGroupName , domainName ) . toBlocking ( ) . single ( ) . body ( ) ; }
Delete a domain . Delete a domain .
28,562
public static void main ( String [ ] args ) throws NoSuchAlgorithmException , InvalidKeyException , IOException { String connectionString = "endpoint={endpoint_value};id={id_value};name={secret_value}" ; ConfigurationAsyncClient client = ConfigurationAsyncClient . builder ( ) . credentials ( new ConfigurationClientCred...
Entry point to the configuration set sample . Creates two sets of configuration values and fetches values from the beta configuration set .
28,563
public Observable < SignalRResourceInner > getByResourceGroupAsync ( String resourceGroupName , String resourceName ) { return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < SignalRResourceInner > , SignalRResourceInner > ( ) { public SignalRResourc...
Get the SignalR service and its properties .
28,564
public WorkflowTriggerCallbackUrlInner listCallbackUrl ( String resourceGroupName , String workflowName , String versionId , String triggerName , GetCallbackUrlParameters parameters ) { return listCallbackUrlWithServiceResponseAsync ( resourceGroupName , workflowName , versionId , triggerName , parameters ) . toBlockin...
Get the callback url for a trigger of a workflow version .
28,565
public Observable < DataWarehouseUserActivityInner > getAsync ( String resourceGroupName , String serverName , String databaseName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < DataWarehouseUserActivityInner > , DataWarehouseUserActivityIn...
Gets the user activities of a data warehouse which includes running and suspended queries .
28,566
public Observable < List < UsageInner > > listByAutomationAccountAsync ( String resourceGroupName , String automationAccountName ) { return listByAutomationAccountWithServiceResponseAsync ( resourceGroupName , automationAccountName ) . map ( new Func1 < ServiceResponse < List < UsageInner > > , List < UsageInner > > ( ...
Retrieve the usage for the account id .
28,567
public Observable < ShareInner > getAsync ( String deviceName , String name , String resourceGroupName ) { return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < ShareInner > , ShareInner > ( ) { public ShareInner call ( ServiceResponse < ShareInner > response...
Gets a share by name .
28,568
private static < T extends ObjectMapper > T initializeObjectMapper ( T mapper ) { mapper . configure ( SerializationFeature . WRITE_DATES_AS_TIMESTAMPS , false ) . configure ( SerializationFeature . WRITE_EMPTY_JSON_ARRAYS , true ) . configure ( SerializationFeature . FAIL_ON_EMPTY_BEANS , false ) . configure ( Deseria...
Initializes an instance of JacksonMapperAdapter with default configurations applied to the object mapper .
28,569
public static boolean isCertificateOperationIdentifier ( String identifier ) { identifier = verifyNonEmpty ( identifier , "identifier" ) ; URI baseUri ; try { baseUri = new URI ( identifier ) ; } catch ( URISyntaxException e ) { return false ; } String [ ] segments = baseUri . getPath ( ) . split ( "/" ) ; if ( segment...
Verifies whether the identifier belongs to a key vault certificate operation .
28,570
public ServiceFuture < CheckAvailabilityResultInner > checkAvailabilityAsync ( CheckAvailabilityParameters parameters , final ServiceCallback < CheckAvailabilityResultInner > serviceCallback ) { return ServiceFuture . fromResponse ( checkAvailabilityWithServiceResponseAsync ( parameters ) , serviceCallback ) ; }
Checks the availability of the given service namespace across all Azure subscriptions . This is useful because the domain name is created based on the service namespace name .
28,571
public Observable < ProtectionContainerResourceInner > getAsync ( String vaultName , String resourceGroupName , String fabricName , String containerName ) { return getWithServiceResponseAsync ( vaultName , resourceGroupName , fabricName , containerName ) . map ( new Func1 < ServiceResponse < ProtectionContainerResource...
Gets details of the specific container registered to your Recovery Services vault .
28,572
public ServiceFuture < Void > refreshAsync ( String vaultName , String resourceGroupName , String fabricName , final ServiceCallback < Void > serviceCallback ) { return ServiceFuture . fromResponse ( refreshWithServiceResponseAsync ( vaultName , resourceGroupName , fabricName ) , serviceCallback ) ; }
Discovers the containers in the subscription that can be protected in a Recovery Services vault . This is an asynchronous operation . To learn the status of the operation use the GetRefreshOperationResult API .
28,573
public ProtectedItemResourceInner get ( String vaultName , String resourceGroupName , String fabricName , String containerName , String protectedItemName , String filter ) { return getWithServiceResponseAsync ( vaultName , resourceGroupName , fabricName , containerName , protectedItemName , filter ) . toBlocking ( ) . ...
Provides the details of the backed up item . This is an asynchronous operation . To know the status of the operation call the GetItemOperationResult API .
28,574
public static EntityGetOperation < AssetInfo > get ( LinkInfo < AssetInfo > link ) { return new DefaultGetOperation < AssetInfo > ( link . getHref ( ) , AssetInfo . class ) ; }
Get the asset at the given link
28,575
public static DefaultListOperation < AssetInfo > list ( LinkInfo < AssetInfo > link ) { return new DefaultListOperation < AssetInfo > ( link . getHref ( ) , new GenericType < ListResult < AssetInfo > > ( ) { } ) ; }
Create an operation that will list all the assets at the given link .
28,576
public static EntityLinkOperation linkContentKey ( String assetId , String contentKeyId ) { String escapedContentKeyId = null ; try { escapedContentKeyId = URLEncoder . encode ( contentKeyId , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new InvalidParameterException ( "contentKeyId" ) ; } URI content...
Link content key .
28,577
public static EntityUnlinkOperation unlinkContentKey ( String assetId , String contentKeyId ) { return new EntityUnlinkOperation ( ENTITY_SET , assetId , "ContentKeys" , contentKeyId ) ; }
unlink a content key .
28,578
public static EntityLinkOperation linkDeliveryPolicy ( String assetId , String deliveryPolicyId ) { String escapedContentKeyId = null ; try { escapedContentKeyId = URLEncoder . encode ( deliveryPolicyId , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new InvalidParameterException ( "deliveryPolicyId" )...
Link delivery policy
28,579
public static EntityUnlinkOperation unlinkDeliveryPolicy ( String assetId , String adpId ) { return new EntityUnlinkOperation ( ENTITY_SET , assetId , "DeliveryPolicies" , adpId ) ; }
unlink an asset delivery policy
28,580
public static JWEObject deserialize ( String json ) throws IOException { ObjectMapper mapper = new ObjectMapper ( ) ; return mapper . readValue ( json , JWEObject . class ) ; }
Construct JWEObject from json string .
28,581
public static TokenProvider createSharedAccessSignatureTokenProvider ( String sasKeyName , String sasKey ) { return new SharedAccessSignatureTokenProvider ( sasKeyName , sasKey , SecurityConstants . DEFAULT_SAS_TOKEN_VALIDITY_IN_SECONDS ) ; }
Creates a Shared Access Signature token provider with the given key name and key value . Returned token provider creates tokens with validity of 20 minutes . This is a utility method .
28,582
public static TokenProvider createAzureActiveDirectoryTokenProvider ( String authorityUrl , String clientId , String userName , String password ) throws MalformedURLException { AuthenticationContext authContext = createAuthenticationContext ( authorityUrl ) ; return new AzureActiveDirectoryTokenProvider ( authContext ,...
Creates an Azure Active Directory token provider that acquires a token from the given active directory instance using the given clientId username and password . This is a utility method .
28,583
public static TokenProvider createAzureActiveDirectoryTokenProvider ( String authorityUrl , String clientId , String clientSecret ) throws MalformedURLException { AuthenticationContext authContext = createAuthenticationContext ( authorityUrl ) ; return new AzureActiveDirectoryTokenProvider ( authContext , new ClientCre...
Creates an Azure Active Directory token provider that acquires a token from the given active directory instance using the given clientId and client secret . This is a utility method .
28,584
public Mono < Response < ConfigurationSetting > > addSetting ( ConfigurationSetting setting ) { validateSetting ( setting ) ; return service . setKey ( serviceEndpoint , setting . key ( ) , setting . label ( ) , setting , null , getETagValue ( ETAG_ANY ) ) ; }
Adds a configuration value in the service if that key and label does not exist . The label value of the ConfigurationSetting is optional .
28,585
public Mono < Response < ConfigurationSetting > > setSetting ( ConfigurationSetting setting ) { validateSetting ( setting ) ; return service . setKey ( serviceEndpoint , setting . key ( ) , setting . label ( ) , setting , getETagValue ( setting . etag ( ) ) , null ) ; }
Creates or updates a configuration value in the service . Partial updates are not supported and the entire configuration setting is updated .
28,586
public Mono < Response < ConfigurationSetting > > updateSetting ( ConfigurationSetting setting ) { validateSetting ( setting ) ; String etag = setting . etag ( ) == null ? ETAG_ANY : setting . etag ( ) ; return service . setKey ( serviceEndpoint , setting . key ( ) , setting . label ( ) , setting , getETagValue ( etag ...
Updates an existing configuration value in the service . The setting must already exist . Partial updates are not supported the entire configuration value is replaced .
28,587
public String toLoggableString ( ) { StringBuilder connectionStringBuilder = new StringBuilder ( ) ; if ( this . endpoint != null ) { connectionStringBuilder . append ( String . format ( Locale . US , "%s%s%s%s" , ENDPOINT_CONFIG_NAME , KEY_VALUE_SEPARATOR , this . endpoint . toString ( ) , KEY_VALUE_PAIR_DELIMITER ) )...
Generates a string that is logged in traces . Excludes secrets
28,588
public static Element getEnvelope ( SOAPMessage m ) { try { return m . getSOAPPart ( ) . getEnvelope ( ) ; } catch ( Exception e ) { throw S1SystemError . wrap ( e ) ; } }
Get envelope element quite
28,589
public static SOAPMessage createSoapFromStream ( Map < String , String > headers , InputStream is ) { return createSoapFromStream ( null , headers , is ) ; }
Create message from stream with headers
28,590
public static void validateMessage ( String basePath , Document wsdl , SOAPMessage msg ) throws XSDFormatException , XSDValidationException { LOG . debug ( "Validating message on WSDL" ) ; NodeList schemaNodes = wsdl . getElementsByTagNameNS ( XMLConstants . W3C_XML_SCHEMA_NS_URI , "schema" ) ; int nrSchemas = schemaNo...
Validate message on wsdl
28,591
public static InputStream toInputStream ( SOAPMessage msg ) { if ( msg == null ) return null ; ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; try { msg . writeTo ( os ) ; } catch ( Exception e ) { throw S1SystemError . wrap ( e ) ; } return new ByteArrayInputStream ( os . toByteArray ( ) ) ; }
Write message with attachments to stream
28,592
public String joinWith ( String separator , Object ... join ) { return Joiner . on ( separator ) . join ( delegate . get ( ) , EMPTY , join ) ; }
Returns a new string that append the specified string to the delegate string with specified separator
28,593
public M update ( String asNewDelegate ) { this . delegate = Optional . of ( asNewDelegate ) ; updateHandle ( ) ; return THIS ( ) ; }
Update the given string as the new delegate string
28,594
public boolean containAll ( String ... containWith ) { for ( String contain : containWith ) { if ( ! contain ( contain ) ) { return false ; } } return true ; }
Checks if delegate string contains all string in the given string array
28,595
public boolean containsAll ( List < String > containWith ) { return containAll ( checkNotNull ( containWith ) . toArray ( new String [ containWith . size ( ) ] ) ) ; }
Checks if delegate string contains all string in the given string list
28,596
public boolean contains ( List < String > containWith ) { return contain ( checkNotNull ( containWith ) . toArray ( new String [ containWith . size ( ) ] ) ) ; }
Checks if delegate string contains any string in the given string list
28,597
public int indexs ( final Integer fromIndex , String ... indexWith ) { int index = INDEX_NONE_EXISTS ; final String target = ignoreCase ? delegate . get ( ) . toLowerCase ( ) : delegate . get ( ) ; for ( String input : indexWith ) { String target2 = ignoreCase ? input . toLowerCase ( ) : input ; if ( ( index = target ....
Search delegate string to find the first index of any string in the given string list starting at the specified index
28,598
public static Map < String , Object > toMap ( LoggingEvent e ) { final Map < String , Object > m = Objects . newHashMap ( "name" , e . getLoggerName ( ) , "date" , new Date ( e . getTimeStamp ( ) ) , "level" , e . getLevel ( ) . toString ( ) , "thread" , e . getThreadName ( ) , "message" , "" + e . getMessage ( ) , "fi...
Convert logging event to map
28,599
public static Map < String , Object > getLogClasses ( ) { SortedMap < String , Object > loggers = new TreeMap < String , Object > ( ) ; Map < String , Object > res = Objects . newHashMap ( "level" , LogManager . getRootLogger ( ) . getLevel ( ) . toString ( ) . toUpperCase ( ) , "loggers" , loggers ) ; Enumeration < Ca...
Get all log classes names