idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
24,500 | 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 ; } } | Deserialize the provided headers returned from a REST API to an entity instance declared as the model to hold Matching headers . |
24,501 | public Observable < AppServiceEnvironmentResourceInner > getByResourceGroupAsync ( String resourceGroupName , String name ) { return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < AppServiceEnvironmentResourceInner > , AppServiceEnvironmentResourceInner > ( ) { public AppServiceEnvironmentResourceInner call ( ServiceResponse < AppServiceEnvironmentResourceInner > response ) { return response . body ( ) ; } } ) ; } | Get the properties of an App Service Environment . Get the properties of an App Service Environment . |
24,502 | 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 ( ) ) { public Page < SiteInner > nextPage ( String nextPageLink ) { return listWebAppsNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) . body ( ) ; } } ; } | Get all apps in an App Service Environment . Get all apps in an App Service Environment . |
24,503 | public Observable < List < ServerUsageInner > > listByServerAsync ( String resourceGroupName , String serverName ) { return listByServerWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < List < ServerUsageInner > > , List < ServerUsageInner > > ( ) { public List < ServerUsageInner > call ( ServiceResponse < List < ServerUsageInner > > response ) { return response . body ( ) ; } } ) ; } | Returns server usages . |
24,504 | public static EntityGetOperation < ContentKeyAuthorizationPolicyInfo > get ( String contentKeyAuthorizationPolicyId ) { return new DefaultGetOperation < ContentKeyAuthorizationPolicyInfo > ( ENTITY_SET , contentKeyAuthorizationPolicyId , ContentKeyAuthorizationPolicyInfo . class ) ; } | Create an operation that will retrieve the given content key authorization policy |
24,505 | public static EntityGetOperation < ContentKeyAuthorizationPolicyInfo > get ( LinkInfo < ContentKeyAuthorizationPolicyInfo > link ) { return new DefaultGetOperation < ContentKeyAuthorizationPolicyInfo > ( link . getHref ( ) , ContentKeyAuthorizationPolicyInfo . class ) ; } | Create an operation that will retrieve the content key authorization policy at the given link |
24,506 | 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 ) ; } | Link a content key authorization policy options . |
24,507 | public static EntityUnlinkOperation unlinkOptions ( String contentKeyAuthorizationPolicyId , String contentKeyAuthorizationPolicyOptionId ) { return new EntityUnlinkOperation ( ENTITY_SET , contentKeyAuthorizationPolicyId , "Options" , contentKeyAuthorizationPolicyOptionId ) ; } | Unlink content key authorization policy options . |
24,508 | public void beginDelete ( String resourceGroupName , String networkInterfaceName , String tapConfigurationName ) { beginDeleteWithServiceResponseAsync ( resourceGroupName , networkInterfaceName , tapConfigurationName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes the specified tap configuration from the NetworkInterface . |
24,509 | public Observable < List < ServiceObjectiveInner > > listByServerAsync ( String resourceGroupName , String serverName ) { return listByServerWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < List < ServiceObjectiveInner > > , List < ServiceObjectiveInner > > ( ) { public List < ServiceObjectiveInner > call ( ServiceResponse < List < ServiceObjectiveInner > > response ) { return response . body ( ) ; } } ) ; } | Returns database service objectives . |
24,510 | public Observable < IotHubDescriptionInner > getByResourceGroupAsync ( String resourceGroupName , String resourceName ) { return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , resourceName ) . map ( new Func1 < ServiceResponse < IotHubDescriptionInner > , IotHubDescriptionInner > ( ) { public IotHubDescriptionInner call ( ServiceResponse < IotHubDescriptionInner > response ) { return response . body ( ) ; } } ) ; } | Get the non - security related metadata of an IoT hub . Get the non - security related metadata of an IoT hub . |
24,511 | public static void inheritClientBehaviorsAndSetPublicProperty ( IInheritedBehaviors inheritingObject , Iterable < BatchClientBehavior > baseBehaviors ) { List < BatchClientBehavior > customBehaviors = new ArrayList < > ( ) ; if ( null != baseBehaviors ) { for ( BatchClientBehavior be : baseBehaviors ) { customBehaviors . add ( be ) ; } } inheritingObject . withCustomBehaviors ( customBehaviors ) ; } | Inherit the BatchClientBehavior classes from parent object |
24,512 | public ServiceFuture < RefreshIndex > refreshIndexMethodAsync ( String listId , final ServiceCallback < RefreshIndex > serviceCallback ) { return ServiceFuture . fromResponse ( refreshIndexMethodWithServiceResponseAsync ( listId ) , serviceCallback ) ; } | Refreshes the index of the list with list Id equal to list Id passed . |
24,513 | public List < SubscriptionDescription > getSubscriptions ( String topicName ) throws ServiceBusException , InterruptedException { return Utils . completeFuture ( this . asyncClient . getSubscriptionsAsync ( topicName ) ) ; } | Retrieves the list of subscriptions for a given topic in the namespace . |
24,514 | public QueueDescription updateQueue ( QueueDescription queueDescription ) throws ServiceBusException , InterruptedException { return Utils . completeFuture ( this . asyncClient . updateQueueAsync ( queueDescription ) ) ; } | Updates an existing queue . |
24,515 | public TopicDescription updateTopic ( TopicDescription topicDescription ) throws ServiceBusException , InterruptedException { return Utils . completeFuture ( this . asyncClient . updateTopicAsync ( topicDescription ) ) ; } | Updates an existing topic . |
24,516 | public SubscriptionDescription updateSubscription ( SubscriptionDescription subscriptionDescription ) throws ServiceBusException , InterruptedException { return Utils . completeFuture ( this . asyncClient . updateSubscriptionAsync ( subscriptionDescription ) ) ; } | Updates an existing subscription . |
24,517 | public static void main ( String [ ] args ) throws NoSuchAlgorithmException , InvalidKeyException { String connectionString = "endpoint={endpoint_value};id={id_value};name={secret_value}" ; ConfigurationAsyncClient client = ConfigurationAsyncClient . builder ( ) . credentials ( new ConfigurationClientCredentials ( connectionString ) ) . build ( ) ; String key = "hello" ; 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 ( ) ; } ) ; } | Runs the sample algorithm and demonstrates how to add get and delete a configuration setting . |
24,518 | 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 . |
24,519 | public static EntityGetOperation < LocatorInfo > get ( String locatorId ) { return new DefaultGetOperation < LocatorInfo > ( ENTITY_SET , locatorId , LocatorInfo . class ) ; } | Create an operation to get the given locator . |
24,520 | public static DefaultListOperation < LocatorInfo > list ( LinkInfo < LocatorInfo > link ) { return new DefaultListOperation < LocatorInfo > ( link . getHref ( ) , new GenericType < ListResult < LocatorInfo > > ( ) { } ) ; } | Create an operation that will list all the locators at the given link . |
24,521 | public static Configuration configureWithAzureAdTokenProvider ( URI apiServer , TokenProvider azureAdTokenProvider ) { return configureWithAzureAdTokenProvider ( Configuration . getInstance ( ) , apiServer , azureAdTokenProvider ) ; } | Returns the default Configuration provisioned for the specified AMS account and token provider . |
24,522 | 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 ; } | Setup a Configuration with specified Configuration AMS account and token provider |
24,523 | 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 ( ) ) ; } | Creates an instance of AzureCliCredentials with the default Azure CLI configuration . |
24,524 | public Observable < ExtendedServerBlobAuditingPolicyInner > getAsync ( String resourceGroupName , String serverName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < ExtendedServerBlobAuditingPolicyInner > , ExtendedServerBlobAuditingPolicyInner > ( ) { public ExtendedServerBlobAuditingPolicyInner call ( ServiceResponse < ExtendedServerBlobAuditingPolicyInner > response ) { return response . body ( ) ; } } ) ; } | Gets an extended server s blob auditing policy . |
24,525 | @ 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 ; } } | Creates an instance of the specific expandable string enum from a String . |
24,526 | @ SuppressWarnings ( "unchecked" ) protected static < T extends ExpandableStringEnum < T > > Collection < T > values ( Class < T > clazz ) { 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 ; } | Gets a collection of all known values to an expandable string enum type . |
24,527 | public static EntityCreateOperation < NotificationEndPointInfo > create ( String name , EndPointType endPointType , String endPointAddress ) { return new Creator ( name , endPointType , endPointAddress ) ; } | Creates an operation to create a new notification end point . |
24,528 | public static EntityGetOperation < NotificationEndPointInfo > get ( String notificationEndPointId ) { return new DefaultGetOperation < NotificationEndPointInfo > ( ENTITY_SET , notificationEndPointId , NotificationEndPointInfo . class ) ; } | Create an operation that will retrieve the given notification end point |
24,529 | public static EntityGetOperation < NotificationEndPointInfo > get ( LinkInfo < NotificationEndPointInfo > link ) { return new DefaultGetOperation < NotificationEndPointInfo > ( link . getHref ( ) , NotificationEndPointInfo . class ) ; } | Create an operation that will retrieve the notification end point at the given link |
24,530 | public Observable < List < ReplicationUsageInner > > listAsync ( String resourceGroupName , String vaultName ) { return listWithServiceResponseAsync ( resourceGroupName , vaultName ) . map ( new Func1 < ServiceResponse < List < ReplicationUsageInner > > , List < ReplicationUsageInner > > ( ) { public List < ReplicationUsageInner > call ( ServiceResponse < List < ReplicationUsageInner > > response ) { return response . body ( ) ; } } ) ; } | Fetches the replication usages of the vault . |
24,531 | public void delete ( String resourceGroupName , String labAccountName ) { deleteWithServiceResponseAsync ( resourceGroupName , labAccountName ) . toBlocking ( ) . last ( ) . body ( ) ; } | Delete lab account . This operation can take a while to complete . |
24,532 | public JobType addJobNotificationSubscriptionType ( JobNotificationSubscriptionType jobNotificationSubscription ) { if ( this . jobNotificationSubscriptionTypes == null ) { this . jobNotificationSubscriptionTypes = new ArrayList < JobNotificationSubscriptionType > ( ) ; } this . jobNotificationSubscriptionTypes . add ( jobNotificationSubscription ) ; return this ; } | Adds the job notification subscription type . |
24,533 | 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 . |
24,534 | public static String formatRulePath ( String topicPath , String subscriptionName , String ruleName ) { return String . join ( pathDelimiter , topicPath , subscriptionsSubPath , subscriptionName , rulesSubPath , ruleName ) ; } | Formats the rule path based on the topic path subscription name and the rule name . |
24,535 | 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 . |
24,536 | 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 . |
24,537 | 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 . |
24,538 | public void delete ( String resourceGroupName , String serverName , String jobAgentName , String credentialName ) { deleteWithServiceResponseAsync ( resourceGroupName , serverName , jobAgentName , credentialName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes a job credential . |
24,539 | public StorageRestoreParameters withStorageBundleBackup ( byte [ ] storageBundleBackup ) { if ( storageBundleBackup == null ) { this . storageBundleBackup = null ; } else { this . storageBundleBackup = Base64Url . encode ( storageBundleBackup ) ; } return this ; } | Set the storageBundleBackup value . |
24,540 | 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 ; } | Get the link with the given rel attribute |
24,541 | public < U extends ODataEntity < ? > > LinkInfo < U > getRelationLink ( String relationName ) { return this . < U > getLink ( Constants . ODATA_DATA_NS + "/related/" + relationName ) ; } | Get the link to navigate an OData relationship |
24,542 | 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 ) ; } | Is the given type a collection of ODataEntity |
24,543 | public void beginDelete ( String resourceGroupName , String expressRouteGatewayName , String connectionName ) { beginDeleteWithServiceResponseAsync ( resourceGroupName , expressRouteGatewayName , connectionName ) . toBlocking ( ) . single ( ) . body ( ) ; } | Deletes a connection to a ExpressRoute circuit . |
24,544 | public static boolean isNullOrWhiteSpace ( String arg ) { if ( Strings . isNullOrEmpty ( arg ) || arg . trim ( ) . isEmpty ( ) ) { return true ; } return false ; } | Determines whether the parameter string is null empty or whitespace . |
24,545 | public static boolean sequenceEqualConstantTime ( byte [ ] self , byte [ ] other ) { if ( self == null ) { throw new IllegalArgumentException ( "self" ) ; } if ( other == null ) { throw new IllegalArgumentException ( "other" ) ; } 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 ; } | Compares two byte arrays in constant time . |
24,546 | public KeyVerifyParameters withDigest ( byte [ ] digest ) { if ( digest == null ) { this . digest = null ; } else { this . digest = Base64Url . encode ( digest ) ; } return this ; } | Set the digest value . |
24,547 | public KeyVerifyParameters withSignature ( byte [ ] signature ) { if ( signature == null ) { this . signature = null ; } else { this . signature = Base64Url . encode ( signature ) ; } return this ; } | Set the signature value . |
24,548 | public Observable < SecretBundle > deleteSecretAsync ( String vaultBaseUrl , String secretName ) { return deleteSecretWithServiceResponseAsync ( vaultBaseUrl , secretName ) . map ( new Func1 < ServiceResponse < SecretBundle > , SecretBundle > ( ) { public SecretBundle call ( ServiceResponse < SecretBundle > response ) { return response . body ( ) ; } } ) ; } | Deletes a secret from a specified key vault . |
24,549 | 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 > > > > ( ) { 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 ) ; } } } ) ; } | List certificates in a specified key vault . |
24,550 | public Observable < CertificateBundle > deleteCertificateAsync ( String vaultBaseUrl , String certificateName ) { return deleteCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName ) . map ( new Func1 < ServiceResponse < CertificateBundle > , CertificateBundle > ( ) { public CertificateBundle call ( ServiceResponse < CertificateBundle > response ) { return response . body ( ) ; } } ) ; } | Deletes a certificate from a specified key vault . |
24,551 | 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 ] ; } | Get the scheme to use for HTTP requests for this Swagger method . |
24,552 | 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 . |
24,553 | 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 ; } | Get the encoded query parameters that have been added to this value based on the provided method arguments . |
24,554 | 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 ; } | Get the encoded form parameters that have been added to this value based on the provided method arguments . |
24,555 | 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 ; } | Get the headers that have been added to this value based on the provided method arguments . |
24,556 | 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 ; } | Get whether or not the provided response status code is one of the expected status codes for this Swagger method . |
24,557 | 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 ; } | Get the object to be used as the value of the HTTP request . |
24,558 | 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 ; } | Checks whether or not the Swagger method expects the response to contain a body . |
24,559 | public static EntityCreateOperation < ContentKeyAuthorizationPolicyOptionInfo > create ( String name , int keyDeliveryType , String keyDeliveryConfiguration , List < ContentKeyAuthorizationPolicyRestriction > restrictions ) { return new Creator ( name , keyDeliveryType , keyDeliveryConfiguration , restrictions ) ; } | Creates an operation to create a new content key authorization options |
24,560 | public static DefaultListOperation < ContentKeyAuthorizationPolicyOptionInfo > list ( LinkInfo < ContentKeyAuthorizationPolicyOptionInfo > link ) { return new DefaultListOperation < ContentKeyAuthorizationPolicyOptionInfo > ( link . getHref ( ) , new GenericType < ListResult < ContentKeyAuthorizationPolicyOptionInfo > > ( ) { } ) ; } | Create an operation that will list all the content keys authorization policy options at the given link . |
24,561 | public Observable < ManagedInstanceVulnerabilityAssessmentInner > getAsync ( String resourceGroupName , String managedInstanceName ) { return getWithServiceResponseAsync ( resourceGroupName , managedInstanceName ) . map ( new Func1 < ServiceResponse < ManagedInstanceVulnerabilityAssessmentInner > , ManagedInstanceVulnerabilityAssessmentInner > ( ) { public ManagedInstanceVulnerabilityAssessmentInner call ( ServiceResponse < ManagedInstanceVulnerabilityAssessmentInner > response ) { return response . body ( ) ; } } ) ; } | Gets the managed instance s vulnerability assessment . |
24,562 | public MimeMultipart getMimeMultipart ( ) throws MessagingException , IOException , JAXBException { List < DataSource > bodyPartContents = createRequestBody ( ) ; return toMimeMultipart ( bodyPartContents ) ; } | Gets the mime multipart . |
24,563 | 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 ; } | Adds the job part . |
24,564 | 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 ) ; } } } | Adds the task part . |
24,565 | 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 ; } | To mime multipart . |
24,566 | 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 ( ) ; 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" ) ; 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 ; } | Creates the batch create entity part . |
24,567 | 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 ) ; } } } } | Parses the batch result . |
24,568 | 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 ) ; } } | Parses the headers . |
24,569 | private InputStream parseEntity ( DataSource ds ) { try { return ds . getInputStream ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } | Parses the entity . |
24,570 | 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 ) ; } } | Parses the parts . |
24,571 | 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 ; } | Parses the parts core . |
24,572 | 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 ) ; } } | Adds the http method . |
24,573 | private void appendHeaders ( OutputStream outputStream , InternetHeaders internetHeaders ) { try { @ 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" ) ) ; } outputStream . write ( "\r\n" . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } | Append headers . |
24,574 | 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 ) ; } } | Append entity . |
24,575 | 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 ) ; } | Gets a target execution . |
24,576 | final void updateDelayInMillisecondsFrom ( HttpResponse httpPollResponse ) { final Long parsedDelayInMilliseconds = delayInMillisecondsFrom ( httpPollResponse ) ; if ( parsedDelayInMilliseconds != null ) { delayInMilliseconds = parsedDelayInMilliseconds ; } } | Update the delay in milliseconds from the provided HTTP poll response . |
24,577 | Mono < Void > delayAsync ( ) { Mono < Void > result = Mono . empty ( ) ; if ( delayInMilliseconds > 0 ) { result = result . delaySubscription ( Duration . ofMillis ( delayInMilliseconds ) ) ; } return result ; } | 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 . |
24,578 | public Observable < TriggerInner > getAsync ( String deviceName , String name , String resourceGroupName ) { return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < TriggerInner > , TriggerInner > ( ) { public TriggerInner call ( ServiceResponse < TriggerInner > response ) { return response . body ( ) ; } } ) ; } | Get a specific trigger by name . |
24,579 | public Observable < EncryptionProtectorInner > getAsync ( String resourceGroupName , String serverName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < EncryptionProtectorInner > , EncryptionProtectorInner > ( ) { public EncryptionProtectorInner call ( ServiceResponse < EncryptionProtectorInner > response ) { return response . body ( ) ; } } ) ; } | Gets a server encryption protector . |
24,580 | public static void eraseKey ( byte [ ] keyToErase ) { if ( keyToErase != null ) { SecureRandom random ; try { random = SecureRandom . getInstance ( "SHA1PRNG" ) ; random . nextBytes ( keyToErase ) ; } catch ( NoSuchAlgorithmException e ) { } } } | Overwrites the supplied byte array with RNG generated data which destroys the original contents . |
24,581 | public Response intercept ( Interceptor . Chain chain ) throws IOException { Request newRequest = this . signHeader ( chain . request ( ) ) ; return chain . proceed ( newRequest ) ; } | Inject the new authentication HEADER |
24,582 | 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 > > > ( ) { 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 ) ; } } } ) ; } | Triggers export of jobs specified by filters and returns an OperationID to track . |
24,583 | public Observable < DatabaseBlobAuditingPolicyInner > getAsync ( String resourceGroupName , String serverName , String databaseName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName , databaseName ) . map ( new Func1 < ServiceResponse < DatabaseBlobAuditingPolicyInner > , DatabaseBlobAuditingPolicyInner > ( ) { public DatabaseBlobAuditingPolicyInner call ( ServiceResponse < DatabaseBlobAuditingPolicyInner > response ) { return response . body ( ) ; } } ) ; } | Gets a database s blob auditing policy . |
24,584 | public Observable < DatabaseBlobAuditingPolicyInner > createOrUpdateAsync ( String resourceGroupName , String serverName , String databaseName , DatabaseBlobAuditingPolicyInner parameters ) { return createOrUpdateWithServiceResponseAsync ( resourceGroupName , serverName , databaseName , parameters ) . map ( new Func1 < ServiceResponse < DatabaseBlobAuditingPolicyInner > , DatabaseBlobAuditingPolicyInner > ( ) { public DatabaseBlobAuditingPolicyInner call ( ServiceResponse < DatabaseBlobAuditingPolicyInner > response ) { return response . body ( ) ; } } ) ; } | Creates or updates a database s blob auditing policy . |
24,585 | 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 ) ; } | Gets the Interval after which nextRetry should be done . |
24,586 | 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 ) ; } | Deletes the specified pool . |
24,587 | 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 ) ; } | Stops a pool resize operation . |
24,588 | 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 ) ; } | Disables automatic scaling on the specified pool . |
24,589 | 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 ) ; } | Checks whether the specified pool exists . |
24,590 | 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 ) ; } | Updates the specified pool . This method only replaces the properties specified with non - null values . |
24,591 | 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 ) ; } | 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 . |
24,592 | public static EntityCreateOperation < AccessPolicyInfo > create ( String name , double durationInMinutes , EnumSet < AccessPolicyPermission > permissions ) { return new Creator ( name , durationInMinutes , permissions ) ; } | Creates an operation to create a new access policy |
24,593 | public static EntityGetOperation < AccessPolicyInfo > get ( String accessPolicyId ) { return new DefaultGetOperation < AccessPolicyInfo > ( ENTITY_SET , accessPolicyId , AccessPolicyInfo . class ) ; } | Create an operation that will retrieve the given access policy |
24,594 | public static EntityGetOperation < AccessPolicyInfo > get ( LinkInfo < AccessPolicyInfo > link ) { return new DefaultGetOperation < AccessPolicyInfo > ( link . getHref ( ) , AccessPolicyInfo . class ) ; } | Create an operation that will retrieve the access policy at the given link |
24,595 | public ContentKeyType getContentKeyType ( ) { Integer contentKeyTypeInteger = getContent ( ) . getContentKeyType ( ) ; ContentKeyType contentKeyType = null ; if ( contentKeyTypeInteger != null ) { contentKeyType = ContentKeyType . fromCode ( contentKeyTypeInteger ) ; } return contentKeyType ; } | Gets the content key type . |
24,596 | public Observable < TermList > getDetailsAsync ( String listId ) { return getDetailsWithServiceResponseAsync ( listId ) . map ( new Func1 < ServiceResponse < TermList > , TermList > ( ) { public TermList call ( ServiceResponse < TermList > response ) { return response . body ( ) ; } } ) ; } | Returns list Id details of the term list with list Id equal to list Id passed . |
24,597 | public SecretRestoreParameters withSecretBundleBackup ( byte [ ] secretBundleBackup ) { if ( secretBundleBackup == null ) { this . secretBundleBackup = null ; } else { this . secretBundleBackup = Base64Url . encode ( secretBundleBackup ) ; } return this ; } | Set the secretBundleBackup value . |
24,598 | public Observable < ServerAutomaticTuningInner > getAsync ( String resourceGroupName , String serverName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < ServerAutomaticTuningInner > , ServerAutomaticTuningInner > ( ) { public ServerAutomaticTuningInner call ( ServiceResponse < ServerAutomaticTuningInner > response ) { return response . body ( ) ; } } ) ; } | Retrieves server automatic tuning options . |
24,599 | public Observable < ServerTableAuditingPolicyInner > getAsync ( String resourceGroupName , String serverName ) { return getWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < ServerTableAuditingPolicyInner > , ServerTableAuditingPolicyInner > ( ) { public ServerTableAuditingPolicyInner call ( ServiceResponse < ServerTableAuditingPolicyInner > response ) { return response . body ( ) ; } } ) ; } | Gets a server s table auditing policy . Table auditing is deprecated use blob auditing instead . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.