idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
152,500 | public R setDescription ( String description ) { mBodyMap . put ( BoxItem . FIELD_DESCRIPTION , description ) ; return ( R ) this ; } | Sets the new description for the item . |
152,501 | public BoxSharedLink getSharedLink ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) : null ; } | Returns the shared link currently set for the item . |
152,502 | public R setSharedLink ( BoxSharedLink sharedLink ) { mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLink ) ; return ( R ) this ; } | Sets the new shared link for the item . |
152,503 | public List < String > getTags ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_TAGS ) ? ( List < String > ) mBodyMap . get ( BoxItem . FIELD_TAGS ) : null ; } | Returns the tags currently set for the item . |
152,504 | public R setTags ( List < String > tags ) { JsonArray jsonArray = new JsonArray ( ) ; for ( String s : tags ) { jsonArray . add ( s ) ; } mBodyMap . put ( BoxItem . FIELD_TAGS , jsonArray ) ; return ( R ) this ; } | Sets the new tags for the item . |
152,505 | public BoxRequestsComment . GetCommentInfo getInfoRequest ( String id ) { BoxRequestsComment . GetCommentInfo request = new BoxRequestsComment . GetCommentInfo ( id , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that retrieves information on a comment |
152,506 | public BoxRequestsComment . AddReplyComment getAddCommentReplyRequest ( String commentId , String message ) { BoxRequestsComment . AddReplyComment request = new BoxRequestsComment . AddReplyComment ( commentId , message , getCommentsUrl ( ) , mSession ) ; return request ; } | Gets a request that adds a reply comment to a comment |
152,507 | public BoxRequestsComment . UpdateComment getUpdateRequest ( String id , String newMessage ) { BoxRequestsComment . UpdateComment request = new BoxRequestsComment . UpdateComment ( id , newMessage , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that updates a comment s information |
152,508 | public BoxRequestsComment . DeleteComment getDeleteRequest ( String id ) { BoxRequestsComment . DeleteComment request = new BoxRequestsComment . DeleteComment ( id , getCommentInfoUrl ( id ) , mSession ) ; return request ; } | Gets a request that deletes a comment |
152,509 | public String getType ( ) { String type = getPropertyAsString ( FIELD_TYPE ) ; if ( type == null ) { return getPropertyAsString ( FIELD_ITEM_TYPE ) ; } return type ; } | Gets the type of the entity . |
152,510 | public static ChooseAuthenticationFragment createChooseAuthenticationFragment ( final Context context , final ArrayList < BoxAuthentication . BoxAuthenticationInfo > listOfAuthInfo ) { ChooseAuthenticationFragment fragment = createAuthenticationActivity ( context ) ; Bundle b = fragment . getArguments ( ) ; if ( b == n... | Create an instance of this fragment to display the given list of BoxAuthenticationInfos . |
152,511 | BoxRefreshAuthRequest refreshOAuth ( String refreshToken , String clientId , String clientSecret ) { BoxRefreshAuthRequest request = new BoxRefreshAuthRequest ( mSession , getTokenUrl ( ) , refreshToken , clientId , clientSecret ) ; return request ; } | Refresh OAuth to be called when OAuth expires . |
152,512 | BoxCreateAuthRequest createOAuth ( String code , String clientId , String clientSecret ) { BoxCreateAuthRequest request = new BoxCreateAuthRequest ( mSession , getTokenUrl ( ) , code , clientId , clientSecret ) ; return request ; } | Create OAuth to be called the first time session tries to authenticate . |
152,513 | public BoxRequestsShare . GetSharedLink getSharedLinkRequest ( String sharedLink , String password ) { BoxSharedLinkSession session = null ; if ( mSession instanceof BoxSharedLinkSession ) { session = ( BoxSharedLinkSession ) mSession ; } else { session = new BoxSharedLinkSession ( mSession ) ; } session . setSharedLin... | Returns a request to get a BoxItem from a shared link . |
152,514 | protected void cleanOutOldAvatars ( File directory , int maxLifeInDays ) { if ( directory != null ) { if ( mCleanedDirectories . contains ( directory . getAbsolutePath ( ) ) ) { return ; } long oldestTimeAllowed = System . currentTimeMillis ( ) - maxLifeInDays * TimeUnit . DAYS . toMillis ( maxLifeInDays ) ; File [ ] f... | Delete all files for user that is older than maxLifeInDays |
152,515 | public BoxSharedLink . Access getAccess ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getAccess ( ) : null ; } | Gets the shared link access currently set for the item in the request . |
152,516 | public R setAccess ( BoxSharedLink . Access access ) { JsonObject jsonObject = getSharedLinkJsonObject ( ) ; jsonObject . add ( BoxSharedLink . FIELD_ACCESS , SdkUtils . getAsStringSafely ( access ) ) ; BoxSharedLink sharedLink = new BoxSharedLink ( jsonObject ) ; mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLi... | Sets the shared link access for the item in the request . |
152,517 | public Date getUnsharedAt ( ) { if ( mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ) { return ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getUnsharedDate ( ) ; } return null ; } | Returns the date the link will be disabled at currently set in the request . |
152,518 | public String getPassword ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getPassword ( ) : null ; } | Returns the shared link password currently set in the request . |
152,519 | public R setPassword ( final String password ) { JsonObject jsonObject = getSharedLinkJsonObject ( ) ; jsonObject . add ( BoxSharedLink . FIELD_PASSWORD , password ) ; BoxSharedLink sharedLink = new BoxSharedLink ( jsonObject ) ; mBodyMap . put ( BoxItem . FIELD_SHARED_LINK , sharedLink ) ; return ( R ) this ; } | Sets the shared link password in the request . |
152,520 | protected Boolean getCanDownload ( ) { return mBodyMap . containsKey ( BoxItem . FIELD_SHARED_LINK ) ? ( ( BoxSharedLink ) mBodyMap . get ( BoxItem . FIELD_SHARED_LINK ) ) . getPermissions ( ) . getCanDownload ( ) : null ; } | Returns the value for whether the shared link allows downloads currently set in the request . |
152,521 | protected R setCanDownload ( boolean canDownload ) { JsonObject jsonPermissionsObject = getPermissionsJsonObject ( ) ; jsonPermissionsObject . add ( BoxSharedLink . Permissions . FIELD_CAN_DOWNLOAD , canDownload ) ; BoxSharedLink . Permissions permissions = new BoxSharedLink . Permissions ( jsonPermissionsObject ) ; Js... | Sets whether the shared link allows downloads in the request . |
152,522 | public R setFields ( String ... fields ) { if ( fields . length == 1 && fields [ 0 ] == null ) { mQueryMap . remove ( QUERY_FIELDS ) ; return ( R ) this ; } if ( fields . length > 0 ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( fields [ 0 ] ) ; for ( int i = 1 ; i < fields . length ; ++ i ) { sb . append... | Sets the fields to return in the response . |
152,523 | public R addRepresentationHintGroup ( String ... hints ) { if ( hints != null ) { mHintHeader . append ( "[" ) ; mHintHeader . append ( TextUtils . join ( "," , hints ) ) ; mHintHeader . append ( "]" ) ; } return ( R ) this ; } | Include a representation hint group into this request . Please refer to representation documentation for more details |
152,524 | public void onReceivedAuthCode ( String code , String baseDomain ) { if ( authType == AUTH_TYPE_WEBVIEW ) { oauthView . setVisibility ( View . INVISIBLE ) ; } startMakingOAuthAPICall ( code , baseDomain ) ; } | Callback method to be called when authentication code is received along with a base domain . The code will then be used to make an API call to create OAuth tokens . |
152,525 | public boolean onAuthFailure ( AuthFailure failure ) { if ( failure . type == OAuthWebView . AuthFailure . TYPE_WEB_ERROR ) { if ( failure . mWebException . getErrorCode ( ) == WebViewClient . ERROR_CONNECT || failure . mWebException . getErrorCode ( ) == WebViewClient . ERROR_HOST_LOOKUP || failure . mWebException . g... | Callback method to be called when authentication failed . |
152,526 | protected void startMakingOAuthAPICall ( final String code , final String baseDomain ) { if ( apiCallStarted . getAndSet ( true ) ) { return ; } showSpinner ( ) ; if ( baseDomain != null ) { mSession . getAuthInfo ( ) . setBaseDomain ( baseDomain ) ; BoxLogUtils . nonFatalE ( "setting Base Domain" , baseDomain , new Ru... | Start to create OAuth after getting the code . |
152,527 | protected Dialog showDialogWhileWaitingForAuthenticationAPICall ( ) { return ProgressDialog . show ( this , getText ( R . string . boxsdk_Authenticating ) , getText ( R . string . boxsdk_Please_wait ) ) ; } | If you don t need the dialog just return null . |
152,528 | public static Intent createOAuthActivityIntent ( final Context context , BoxSession session , boolean loginViaBoxApp ) { Intent intent = createOAuthActivityIntent ( context , session . getClientId ( ) , session . getClientSecret ( ) , session . getRedirectUrl ( ) , loginViaBoxApp ) ; intent . putExtra ( EXTRA_SESSION ,... | Create intent to launch OAuthActivity using information from the given session . |
152,529 | private OAuthWebView . AuthFailure getAuthFailure ( Exception e ) { String error = getString ( R . string . boxsdk_Authentication_fail ) ; if ( e != null ) { Throwable ex = e instanceof ExecutionException ? ( ( ExecutionException ) e ) . getCause ( ) : e ; if ( ex instanceof BoxException ) { BoxError boxError = ( ( Box... | Takes an auth exception and converts it to an AuthFailure so it can be properly handled |
152,530 | public BoxRequestsSearch . Search getSearchRequest ( String query ) { BoxRequestsSearch . Search request = new BoxRequestsSearch . Search ( query , getSearchUrl ( ) , mSession ) ; return request ; } | Gets a request to search |
152,531 | protected void importRequestContentMapsFrom ( BoxRequest source ) { this . mQueryMap = new HashMap < String , String > ( source . mQueryMap ) ; this . mBodyMap = new LinkedHashMap < String , Object > ( source . mBodyMap ) ; } | Copies data from query and body maps into the current request . |
152,532 | public final T send ( ) throws BoxException { Exception ex = null ; T result = null ; try { result = onSend ( ) ; } catch ( Exception e ) { ex = e ; } onSendCompleted ( new BoxResponse ( result , ex , this ) ) ; if ( ex != null ) { if ( ex instanceof BoxException ) { throw ( BoxException ) ex ; } else { throw new BoxEx... | Synchronously make the request to Box and handle the response appropriately . |
152,533 | public String getStringBody ( ) throws UnsupportedEncodingException { if ( mStringBody != null ) return mStringBody ; if ( mContentType != null ) { switch ( mContentType ) { case JSON : JsonObject jsonBody = new JsonObject ( ) ; for ( Map . Entry < String , Object > entry : mBodyMap . entrySet ( ) ) { parseHashMapEntry... | Gets the string body for the request . |
152,534 | protected < R extends BoxRequest & BoxCacheableRequest > BoxFutureTask < T > handleToTaskForCachedResult ( ) throws BoxException { BoxCache cache = BoxConfig . getCache ( ) ; if ( cache == null ) { throw new BoxException . CacheImplementationNotFound ( ) ; } return new BoxCacheFutureTask < T , R > ( mClazz , ( R ) getC... | Default implementation for getting a task to execute the request . |
152,535 | protected void handleUpdateCache ( BoxResponse < T > response ) throws BoxException { BoxCache cache = BoxConfig . getCache ( ) ; if ( cache != null ) { cache . put ( response ) ; } } | If available makes a call to update the cache with the provided result |
152,536 | protected Socket getSocket ( ) { if ( mSocketFactoryRef != null && mSocketFactoryRef . get ( ) != null ) { return ( ( SSLSocketFactoryWrapper ) mSocketFactoryRef . get ( ) ) . getSocket ( ) ; } return null ; } | This method requires mRequiresSocket to be set to true before connecting . |
152,537 | public BoxAuthenticationInfo getAuthInfo ( String userId , Context context ) { return userId == null ? null : getAuthInfoMap ( context ) . get ( userId ) ; } | Get the BoxAuthenticationInfo for a given user . |
152,538 | public void onAuthenticated ( BoxAuthenticationInfo infoOriginal , Context context ) { BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; if ( ! SdkUtils . isBlank ( info . accessToken ( ) ) && ( info . getUser ( ) == null || SdkUtils . isBlank ( info . getUser ( ) . getId ( ) ) ... | Callback method to be called when authentication process finishes . |
152,539 | public void onAuthenticationFailure ( BoxAuthenticationInfo infoOriginal , Exception ex ) { String msg = "failure:" ; if ( getAuthStorage ( ) != null ) { msg += "auth storage :" + getAuthStorage ( ) . toString ( ) ; } BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; if ( info !... | Callback method to be called if authentication process fails . |
152,540 | public void onLoggedOut ( BoxAuthenticationInfo infoOriginal , Exception ex ) { BoxAuthenticationInfo info = BoxAuthenticationInfo . unmodifiableObject ( infoOriginal ) ; Set < AuthListener > listeners = getListeners ( ) ; for ( AuthListener listener : listeners ) { listener . onLoggedOut ( info , ex ) ; } } | Callback method to be called on logout . |
152,541 | public synchronized void logout ( final BoxSession session ) { BoxUser user = session . getUser ( ) ; if ( user == null ) { return ; } session . clearCache ( ) ; Context context = session . getApplicationContext ( ) ; String userId = user . getId ( ) ; getAuthInfoMap ( session . getApplicationContext ( ) ) ; BoxAuthent... | Log out current BoxSession . After logging out the authentication information related to the Box user in this session will be gone . |
152,542 | public synchronized void logoutAllUsers ( Context context ) { getAuthInfoMap ( context ) ; for ( String userId : mCurrentAccessInfo . keySet ( ) ) { BoxSession session = new BoxSession ( context , userId ) ; logout ( session ) ; } authStorage . clearAuthInfoMap ( context ) ; } | Log out all users . After logging out all authentication information will be gone . |
152,543 | public synchronized FutureTask < BoxAuthenticationInfo > create ( BoxSession session , final String code ) { FutureTask < BoxAuthenticationInfo > task = doCreate ( session , code ) ; BoxAuthentication . AUTH_EXECUTOR . submit ( task ) ; return task ; } | Create Oauth for the first time . This method should be called by ui to authenticate the user for the first time . |
152,544 | public synchronized FutureTask < BoxAuthenticationInfo > refresh ( BoxSession session ) { BoxUser user = session . getUser ( ) ; if ( user == null ) { return doRefresh ( session , session . getAuthInfo ( ) ) ; } getAuthInfoMap ( session . getApplicationContext ( ) ) ; BoxAuthenticationInfo info = mCurrentAccessInfo . g... | Refresh the OAuth in the given BoxSession . This method is called when OAuth token expires . |
152,545 | public synchronized void addListener ( AuthListener listener ) { if ( getListeners ( ) . contains ( listener ) ) { return ; } mListeners . add ( new WeakReference < > ( listener ) ) ; } | Add listener to listen to the authentication process for this BoxSession . |
152,546 | private synchronized void startAuthenticateUI ( BoxSession session ) { Context context = session . getApplicationContext ( ) ; Intent intent = OAuthActivity . createOAuthActivityIntent ( context , session , BoxAuthentication . isBoxAuthAppAvailable ( context ) && session . isEnabledBoxAppAuthentication ( ) ) ; intent .... | Start authentication UI . |
152,547 | public static boolean isBoxAuthAppAvailable ( final Context context ) { Intent intent = new Intent ( BoxConstants . REQUEST_BOX_APP_FOR_AUTH_INTENT_ACTION ) ; List < ResolveInfo > infos = context . getPackageManager ( ) . queryIntentActivities ( intent , PackageManager . MATCH_DEFAULT_ONLY | PackageManager . GET_RESOLV... | A check to see if an official box application supporting third party authentication is available . This lets users authenticate without re - entering credentials . |
152,548 | public boolean removeHeaderView ( View v ) { if ( mHeaderViewInfos . size ( ) > 0 ) { boolean result = false ; ListAdapter adapter = getAdapter ( ) ; if ( adapter != null && ( ( HeaderViewGridAdapter ) adapter ) . removeHeader ( v ) ) { result = true ; } removeFixedViewInfo ( v , mHeaderViewInfos ) ; return result ; } ... | Removes a previously - added header view . |
152,549 | public ListJobsResponse listJobs ( String marker , int maxKeys ) { return listJobs ( new ListJobsRequest ( ) . withMaxKeys ( maxKeys ) . withMarker ( marker ) ) ; } | List Batch - Compute jobs owned by the authenticated user . |
152,550 | public CreateJobResponse createJob ( CreateJobRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getName ( ) , "The name should not be null or empty string." ) ; checkStringNotEmpty ( request . getVmType ( ) , "The vmType should not be null or empty string." )... | Create a Batch - Compute job with the specified options . |
152,551 | public void cancelJob ( CancelJobRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getJobId ( ) , "The parameter jobId should not be null or empty string." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , JOB , req... | Cancel a Batch - Compute job . |
152,552 | private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod , String ... pathVariables ) { List < String > path = new ArrayList < String > ( ) ; path . add ( VERSION ) ; if ( pathVariables != null ) { for ( String pathVariable : pathVariables ) { path . add ( pathVariable ) ; } } U... | Creates and initializes a new request object for the specified resource . |
152,553 | public ListRuleResponse listRules ( ListRuleRequest request ) { InternalRequest internalRequest = createRequest ( request , HttpMethodName . GET , RULES ) ; if ( request . getPageNo ( ) > 0 ) { internalRequest . addParameter ( "pageNo" , String . valueOf ( request . getPageNo ( ) ) ) ; } if ( request . getPageSize ( ) ... | list all the rules under this account |
152,554 | private InternalRequest createRequest ( AbstractBceRequest bceRequest , HttpMethodName httpMethod , String ... pathVariables ) { List < String > path = new ArrayList < String > ( ) ; path . add ( VERSION ) ; if ( pathVariables != null ) { for ( String pathVariable : pathVariables ) { path . add ( pathVariable ) ; } } U... | Creates and initializes a new request object for the specified bcc resource . This method is responsible for determining the right way to address resources . |
152,555 | private void fillPayload ( InternalRequest internalRequest , AbstractBceRequest bceRequest ) { if ( internalRequest . getHttpMethod ( ) == HttpMethodName . POST || internalRequest . getHttpMethod ( ) == HttpMethodName . PUT ) { String strJson = JsonUtils . toJsonString ( bceRequest ) ; byte [ ] requestJson = null ; try... | The method to fill the internalRequest s content field with bceRequest . Only support HttpMethodName . POST or HttpMethodName . PUT |
152,556 | private String aes128WithFirst16Char ( String content , String privateKey ) throws GeneralSecurityException { byte [ ] crypted = null ; SecretKeySpec skey = new SecretKeySpec ( privateKey . substring ( 0 , 16 ) . getBytes ( ) , "AES" ) ; Cipher cipher = Cipher . getInstance ( "AES/ECB/PKCS5Padding" ) ; cipher . init ( ... | The encryption implement for AES - 128 algorithm for BCE password encryption . Only the first 16 bytes of privateKey will be used to encrypt the content . |
152,557 | public ListInstancesResponse listInstances ( ListInstancesRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter (... | Return a list of instances owned by the authenticated user . |
152,558 | public GetInstanceResponse getInstance ( GetInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkNotNull ( request . getInstanceId ( ) , "request instanceId should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , INSTANCE_... | Get the detail information of specified instance . |
152,559 | public void startInstance ( StartInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . PUT , INSTANCE_PRE... | Starting the instance owned by the user . |
152,560 | public void modifyInstanceAttributes ( ModifyInstanceAttributesRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; checkStringNotEmpty ( request . getName ( ) , "request name should not be empty.... | Modifying the special attribute to new value of the instance . |
152,561 | public void rebuildInstance ( String instanceId , String imageId , String adminPass ) throws BceClientException { this . rebuildInstance ( new RebuildInstanceRequest ( ) . withInstanceId ( instanceId ) . withImageId ( imageId ) . withAdminPass ( adminPass ) ) ; } | Rebuilding the instance owned by the user . |
152,562 | public void releaseInstance ( ReleaseInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , INSTA... | Releasing the instance owned by the user . |
152,563 | public void resizeInstance ( ResizeInstanceRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getInstanceId ( ) , "request instanc... | Resizing the instance owned by the user . |
152,564 | public GetInstanceVncResponse getInstanceVnc ( GetInstanceVncRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getInstanceId ( ) , "request instanceId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName ... | Getting the vnc url to access the instance . |
152,565 | public void purchaseReservedInstance ( PurchaseReservedInstanceRequeset request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } if ( null == request . getBilling ( ) ) { reque... | Renewing the instance with fixed duration . |
152,566 | public CreateVolumeResponse createVolume ( CreateVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } if ( null == request . getBilling ( ) ) { request . setB... | Create a volume with the specified options . |
152,567 | public ListVolumesResponse listVolumes ( ListVolumesRequest request ) { InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , VOLUME_PREFIX ) ; if ( request . getMarker ( ) != null ) { internalRequest . addParameter ( "marker" , request . getMarker ( ) ) ; } if ( request . getMaxKeys... | Listing volumes owned by the authenticated user . |
152,568 | public GetVolumeResponse getVolume ( GetVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getVolumeId ( ) , "request volumeId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , VOLUME_PREF... | Get the detail information of specified volume . |
152,569 | public void releaseVolume ( ReleaseVolumeRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getVolumeId ( ) , "request volumeId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , VOLUME_PREFIX... | Releasing the specified volume owned by the user . |
152,570 | public CreateImageResponse createImageFromInstance ( String imageName , String instanceId ) { return createImage ( new CreateImageRequest ( ) . withImageName ( imageName ) . withInstanceId ( instanceId ) ) ; } | Creating a customized image from the instance .. |
152,571 | public CreateImageResponse createImageFromSnapshot ( String imageName , String snapshotId ) { return createImage ( new CreateImageRequest ( ) . withImageName ( imageName ) . withSnapshotId ( snapshotId ) ) ; } | Creating a customized image from specified snapshot . |
152,572 | public CreateImageResponse createImage ( CreateImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . getImageName ( ) , "request... | Creating a customized image which can be used for creating instance in the future . |
152,573 | public ListImagesResponse listImages ( ListImagesRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , IMAGE_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRequest . addP... | Listing images owned by the authenticated user . |
152,574 | public GetImageResponse getImage ( GetImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getImageId ( ) , "request imageId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , IMAGE_PREFIX , r... | Get the detail information of specified image . |
152,575 | public void deleteImage ( DeleteImageRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getImageId ( ) , "request imageId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , IMAGE_PREFIX , requ... | Deleting the specified image . |
152,576 | public ListSnapshotsResponse listSnapshots ( ListSnapshotsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SNAPSHOT_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ( ) ) ) { internalRe... | Listing snapshots owned by the authenticated user . |
152,577 | public GetSnapshotResponse getSnapshot ( GetSnapshotRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSnapshotId ( ) , "request snapshotId should no be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SN... | Getting the detail information of specified snapshot . |
152,578 | public void deleteSnapshot ( DeleteSnapshotRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSnapshotId ( ) , "request snapshotId should no be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . DELETE , SNAPSHOT... | Deleting the specified snapshot . |
152,579 | public ListSecurityGroupsResponse listSecurityGroups ( ListSecurityGroupsRequest request ) { checkNotNull ( request , "request should not be null." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodName . GET , SECURITYGROUP_PREFIX ) ; if ( ! Strings . isNullOrEmpty ( request . getMarker ... | Listing SecurityGroup owned by the authenticated user . |
152,580 | public CreateSecurityGroupResponse createSecurityGroup ( CreateSecurityGroupRequest request ) { checkNotNull ( request , "request should not be null." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . setClientToken ( this . generateClientToken ( ) ) ; } checkStringNotEmpty ( request . get... | Creating a newly SecurityGroup with specified rules . |
152,581 | public void authorizeSecurityGroupRule ( SecurityGroupRuleOperateRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSecurityGroupId ( ) , "securityGroupId should not be empty." ) ; if ( Strings . isNullOrEmpty ( request . getClientToken ( ) ) ) { request . ... | authorizing a security group rule to a specified security group |
152,582 | public void deleteSecurityGroup ( DeleteSecurityGroupRequest request ) { checkNotNull ( request , "request should not be null." ) ; checkStringNotEmpty ( request . getSecurityGroupId ( ) , "request securityGroupId should not be empty." ) ; InternalRequest internalRequest = this . createRequest ( request , HttpMethodNam... | Deleting the specified SecurityGroup . |
152,583 | public String getUserMetaDataOf ( String key ) { return this . userMetadata == null ? null : this . userMetadata . get ( key ) ; } | For internal use only . Returns the value of the userMetadata for the specified key . |
152,584 | public ListMediaResourceResponse listMediaResources ( int pageNo , int pageSize , String status , Date begin , Date end , String title ) { ListMediaResourceRequest request = new ListMediaResourceRequest ( ) . withPageNo ( pageNo ) . withPageSize ( pageSize ) . withStatus ( status ) . withBegin ( begin ) . withEnd ( end... | List the properties of all media resource managed by VOD service . recommend use marker mode to get high performance |
152,585 | public ListMediaResourceByMarkerResponse listMediaResourcesByMarker ( String marker , int maxSize , String status , Date begin , Date end , String title ) { ListMediaResourceByMarkerRequest request = new ListMediaResourceByMarkerRequest ( ) . withMarker ( marker ) . withMaxSize ( maxSize ) . withStatus ( status ) . wit... | Use marker mode to List the properties of all media resource managed by VOD service . If media size beyond 1000 strongly recommend to use marker mode |
152,586 | public GetMediaSourceDownloadResponse getMediaSourceDownload ( String mediaId , long expiredInSeconds ) { GetMediaSourceDownloadRequest request = new GetMediaSourceDownloadRequest ( ) . withMediaId ( mediaId ) . withExpiredInSeconds ( expiredInSeconds ) ; return getMediaSourceDownload ( request ) ; } | get media source download url . |
152,587 | public Datapoint addLongValue ( long time , long value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_LONG ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new LongNode ( value ) ) ) ; return this ; } | Add datapoint of long type value . |
152,588 | public Datapoint addDoubleValue ( long time , double value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_DOUBLE ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new DoubleNode ( value ) ) ) ; return this ; } | Add datapoint of double type value . |
152,589 | public Datapoint addStringValue ( long time , String value ) { initialValues ( ) ; checkType ( TsdbConstants . TYPE_STRING ) ; values . add ( Lists . < JsonNode > newArrayList ( new LongNode ( time ) , new TextNode ( value ) ) ) ; return this ; } | Add datapoint of String type value . |
152,590 | public Datapoint addTag ( String tagKey , String tagValue ) { initialTags ( ) ; tags . put ( tagKey , tagValue ) ; return this ; } | Add tag for the datapoint . |
152,591 | public static String hmacSha256 ( String input , String secretKey ) { if ( input == null ) { throw new NullPointerException ( "input" ) ; } else if ( secretKey == null ) { throw new NullPointerException ( "secretKey" ) ; } return hmacSha256 ( input . getBytes ( CHARSET_UTF8 ) , secretKey . getBytes ( CHARSET_UTF8 ) ) ;... | Encodes the input String using the UTF8 charset and calls hmacSha256 ; |
152,592 | public String getEndpoint ( ) { String url = this . endpoint ; if ( this . endpoint != null && this . endpoint . length ( ) > 0 && endpoint . indexOf ( "://" ) < 0 ) { url = protocol . toString ( ) . toLowerCase ( ) + "://" + endpoint ; } return url ; } | Returns the service endpoint URL to which the client will connect . |
152,593 | public void sign ( InternalRequest request , BceCredentials credentials , SignOptions options ) { checkNotNull ( request , "request should not be null." ) ; if ( credentials == null ) { return ; } if ( options == null ) { if ( request . getSignOptions ( ) != null ) { options = request . getSignOptions ( ) ; } else { op... | Sign the given request with the given set of credentials . Modifies the passed - in request to apply the signature . |
152,594 | public void deleteRouteRule ( DeleteRouteRequest deleteRouteRequest ) { checkNotNull ( deleteRouteRequest , "request should not be null." ) ; checkNotNull ( deleteRouteRequest . getRouteRuleId ( ) , "request routeRuleId should not be null." ) ; if ( Strings . isNullOrEmpty ( deleteRouteRequest . getClientToken ( ) ) ) ... | Delete the specific route rule |
152,595 | public void setResponses ( Map < String , List < Map < String , AttributeValue > > > responses ) { this . responses = responses ; } | Set the processed items content for this BatchGetItem request . |
152,596 | public CreateTranscodingJobResponse createTranscodingJob ( String pipelineName , String sourceKey , String targetKey , String presetName , String watermarkId , DelogoArea delogoArea ) { CreateTranscodingJobRequest request = new CreateTranscodingJobRequest ( ) ; request . setPipelineName ( pipelineName ) ; Source source... | Creates a new transcoder job which converts media files in BOS buckets with specified preset watermarkId and delogoArea . |
152,597 | public ListPipelinesResponse listPipelines ( ListPipelinesRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; InternalRequest internalRequest = createRequest ( HttpMethodName . GET , request , PIPELINE ) ; return invokeHttpClient ( internalRequest , ListPipelinesResponse . class... | List all your pipelines . |
152,598 | public void deletePipeline ( DeletePipelineRequest request ) { checkNotNull ( request , "The parameter request should NOT be null." ) ; checkStringNotEmpty ( request . getPipelineName ( ) , "The parameter pipelineName should NOT be null or empty string." ) ; InternalRequest internalRequest = createRequest ( HttpMethodN... | Deletes a pipeline with the specified pipeline name . |
152,599 | public CreatePresetResponse createPreset ( String presetName , String container ) { return createPreset ( presetName , null , container , true , null , null , null , null , null ) ; } | Create a preset which only convert source media file to a different container format without changing the file contents . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.