com.baidubce.services.subnet.model
Class CreateSubnetRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.subnet.model.CreateSubnetRequest

public class CreateSubnetRequest
extends AbstractBceRequest

The request for creating a newly subnet.


Constructor Summary
CreateSubnetRequest()
           
 
Method Summary
 String getCidr()
           
 String getClientToken()
           
 String getDescription()
           
 String getName()
           
 String getSubnetType()
           
 String getVpcId()
           
 String getZoneName()
           
 void setCidr(String cidr)
           
 void setClientToken(String clientToken)
           
 void setDescription(String description)
           
 void setName(String name)
           
 void setSubnetType(String subnetType)
           
 void setVpcId(String vpcId)
           
 void setZoneName(String zoneName)
           
 CreateSubnetRequest withCidr(String cidr)
          Configure cidr for the request.
 CreateSubnetRequest withClientToken(String clientToken)
          Configure optional client token for the request.
 CreateSubnetRequest withDescription(String description)
          Configure description for the request.
 CreateSubnetRequest withName(String name)
          Configure name for the request.
 CreateSubnetRequest withRequestCredentials(BceCredentials credentials)
          Configure request credential for the request.
 CreateSubnetRequest withSubnetType(String subnetType)
          Configure subnet type for the request.
 CreateSubnetRequest withVpcId(String vpcId)
          Configure vpc id for the request.
 CreateSubnetRequest withZoneName(String zoneName)
          Configure zoneName for the request.
 
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

CreateSubnetRequest

public CreateSubnetRequest()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getZoneName

public String getZoneName()

setZoneName

public void setZoneName(String zoneName)

getCidr

public String getCidr()

setCidr

public void setCidr(String cidr)

getVpcId

public String getVpcId()

setVpcId

public void setVpcId(String vpcId)

getSubnetType

public String getSubnetType()

setSubnetType

public void setSubnetType(String subnetType)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getClientToken

public String getClientToken()

setClientToken

public void setClientToken(String clientToken)

withClientToken

public CreateSubnetRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided. If the clientToken is not specified by the user, a random String generated by default algorithm will be used.

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

withName

public CreateSubnetRequest withName(String name)
Configure name for the request.

Parameters:
name - The name of subnet
Returns:
CreateSubnetRequest with specific name

withZoneName

public CreateSubnetRequest withZoneName(String zoneName)
Configure zoneName for the request.

Parameters:
zoneName - the name of available zone
Returns:
CreateSubnetRequest with zone name

withCidr

public CreateSubnetRequest withCidr(String cidr)
Configure cidr for the request.

Parameters:
cidr - the cidr of subnet
Returns:
CreateSubnetRequest with cidr

withVpcId

public CreateSubnetRequest withVpcId(String vpcId)
Configure vpc id for the request.

Parameters:
vpcId - the vpcId of subnet
Returns:
CreateSubnetRequest with vpcId

withSubnetType

public CreateSubnetRequest withSubnetType(String subnetType)
Configure subnet type for the request.

Parameters:
subnetType - the type of subnet
Returns:
CreateSubnetRequest with subnet type

withDescription

public CreateSubnetRequest withDescription(String description)
Configure description for the request.

Parameters:
description - the type of subnet
Returns:
CreateSubnetRequest with description

withRequestCredentials

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

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


Copyright © 2018. All rights reserved.