com.baidubce.services.bcc.model.volume
Class CreateVolumeRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bcc.model.volume.CreateVolumeRequest

public class CreateVolumeRequest
extends AbstractBceRequest

The request for creating a new volume.


Constructor Summary
CreateVolumeRequest()
           
 
Method Summary
 Billing getBilling()
           
 int getCdsSizeInGB()
           
 String getClientToken()
           
 int getPurchaseCount()
           
 String getSnapshotId()
           
 String getStorageType()
           
 String getZoneName()
           
 void setBilling(Billing billing)
           
 void setCdsSizeInGB(int cdsSizeInGB)
           
 void setClientToken(String clientToken)
           
 void setPurchaseCount(int purchaseCount)
           
 void setSnapshotId(String snapshotId)
           
 void setStorageType(String storageType)
           
 void setZoneName(String zoneName)
           
 CreateVolumeRequest withBilling(Billing billing)
          Configure billing for the request.
 CreateVolumeRequest withCdsSizeInGB(int cdsSizeInGB)
          Configure cdsSizeInGB for the request.
 CreateVolumeRequest withClientToken(String clientToken)
          Configure optional client token for the request.
 CreateVolumeRequest withPurchaseCount(int purchaseCount)
          Configure purchaseCount for the request.
 CreateVolumeRequest withRequestCredentials(BceCredentials credentials)
          Configure request credential for the request.
 CreateVolumeRequest withSnapshotId(String snapshotId)
          Configure snapshotId for the request.
 CreateVolumeRequest withStorageType(String storageType)
          Configure storageType for the request.
 CreateVolumeRequest withZoneName(String zoneName)
           
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateVolumeRequest

public CreateVolumeRequest()
Method Detail

getClientToken

public String getClientToken()

setClientToken

public void setClientToken(String clientToken)

withClientToken

public CreateVolumeRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided.

Parameters:
clientToken - An ASCII string whose length is less than 64. See more detail at BCE API doc
Returns:
CreateVolumeRequest with specific clientToken

getPurchaseCount

public int getPurchaseCount()

setPurchaseCount

public void setPurchaseCount(int purchaseCount)

withPurchaseCount

public CreateVolumeRequest withPurchaseCount(int purchaseCount)
Configure purchaseCount for the request.

Parameters:
purchaseCount - The number of volume to buy, the default value is 1.
Returns:
CreateVolumeRequest with specific purchaseCount

getCdsSizeInGB

public int getCdsSizeInGB()

setCdsSizeInGB

public void setCdsSizeInGB(int cdsSizeInGB)

withCdsSizeInGB

public CreateVolumeRequest withCdsSizeInGB(int cdsSizeInGB)
Configure cdsSizeInGB for the request.

Parameters:
cdsSizeInGB - The size of volume to create in GB. By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
Returns:
CreateVolumeRequest with cdsSizeInGB.

getStorageType

public String getStorageType()

setStorageType

public void setStorageType(String storageType)

withStorageType

public CreateVolumeRequest withStorageType(String storageType)
Configure storageType for the request.

Parameters:
storageType - The storage type of volume, see more detail in BCE API doc
Returns:
CreateVolumeRequest with storageType.

getBilling

public Billing getBilling()

setBilling

public void setBilling(Billing billing)

withBilling

public CreateVolumeRequest withBilling(Billing billing)
Configure billing for the request.

Parameters:
billing - The detail model to specify the billing.
Returns:
CreateVolumeRequest with specific billing

getSnapshotId

public String getSnapshotId()

setSnapshotId

public void setSnapshotId(String snapshotId)

withSnapshotId

public CreateVolumeRequest withSnapshotId(String snapshotId)
Configure snapshotId for the request.

Parameters:
snapshotId - The id of snapshot.By specifying the snapshotId, it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
Returns:
CreateVolumeRequest with snapshotId.

getZoneName

public String getZoneName()

setZoneName

public void setZoneName(String zoneName)

withZoneName

public CreateVolumeRequest withZoneName(String zoneName)

withRequestCredentials

public CreateVolumeRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.

Specified by:
withRequestCredentials in class AbstractBceRequest
Parameters:
credentials - a valid instance of BceCredentials.
Returns:
CreateVolumeRequest with credentials.


Copyright © 2018. All rights reserved.