Package cloud.dnation.hetznerclient
Class CreateServerRequest
- java.lang.Object
-
- cloud.dnation.hetznerclient.CreateServerRequest
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-08-17T03:32:29.204871Z[Etc/UTC]") public class CreateServerRequest extends ObjectCreateServerRequest
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERIALIZED_NAME_AUTOMOUNTstatic StringSERIALIZED_NAME_DATACENTERstatic StringSERIALIZED_NAME_IMAGEstatic StringSERIALIZED_NAME_LABELSstatic StringSERIALIZED_NAME_LOCATIONstatic StringSERIALIZED_NAME_NAMEstatic StringSERIALIZED_NAME_NETWORKSstatic StringSERIALIZED_NAME_PLACEMENT_GROUPstatic StringSERIALIZED_NAME_PUBLIC_NETstatic StringSERIALIZED_NAME_SERVER_TYPEstatic StringSERIALIZED_NAME_SSH_KEYSstatic StringSERIALIZED_NAME_START_AFTER_CREATEstatic StringSERIALIZED_NAME_USER_DATAstatic StringSERIALIZED_NAME_VOLUMES
-
Constructor Summary
Constructors Constructor Description CreateServerRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateServerRequestaddNetworksItem(Long networksItem)CreateServerRequestaddSshKeysItem(String sshKeysItem)CreateServerRequestaddVolumesItem(Long volumesItem)CreateServerRequestautomount(Boolean automount)CreateServerRequestdatacenter(String datacenter)booleanequals(Object o)BooleangetAutomount()Auto-mount Volumes after attachStringgetDatacenter()ID or name of Datacenter to create Server in (must not be used together with location)StringgetImage()ID or name of the Image the Server is created fromMap<String,String>getLabels()User-defined labels (key-value pairs)StringgetLocation()ID or name of Location to create Server in (must not be used together with datacenter)StringgetName()Name of the Server to create (must be unique per Project and a valid hostname as per RFC 1123)List<Long>getNetworks()Network IDs which should be attached to the Server private network interface at the creation timeLonggetPlacementGroup()ID of the Placement Group the server should be inPublicNetRequestgetPublicNet()Get publicNetStringgetServerType()ID or name of the Server type this Server should be created withList<String>getSshKeys()SSH key IDs (`long`) or names (`string`) which should be injected into the Server at creation timeBooleangetStartAfterCreate()Start Server right after creation.StringgetUserData()Cloud-Init user data to use during Server creation.List<Long>getVolumes()Volume IDs which should be attached to the Server at the creation time.inthashCode()CreateServerRequestimage(String image)CreateServerRequestlabels(Map<String,String> labels)CreateServerRequestlocation(String location)CreateServerRequestname(String name)CreateServerRequestnetworks(List<Long> networks)CreateServerRequestplacementGroup(Long placementGroup)CreateServerRequestpublicNet(PublicNetRequest publicNet)CreateServerRequestputLabelsItem(String key, String labelsItem)CreateServerRequestserverType(String serverType)voidsetAutomount(Boolean automount)voidsetDatacenter(String datacenter)voidsetImage(String image)voidsetLabels(Map<String,String> labels)voidsetLocation(String location)voidsetName(String name)voidsetNetworks(List<Long> networks)voidsetPlacementGroup(Long placementGroup)voidsetPublicNet(PublicNetRequest publicNet)voidsetServerType(String serverType)voidsetSshKeys(List<String> sshKeys)voidsetStartAfterCreate(Boolean startAfterCreate)voidsetUserData(String userData)voidsetVolumes(List<Long> volumes)CreateServerRequestsshKeys(List<String> sshKeys)CreateServerRequeststartAfterCreate(Boolean startAfterCreate)StringtoString()CreateServerRequestuserData(String userData)CreateServerRequestvolumes(List<Long> volumes)
-
-
-
Field Detail
-
SERIALIZED_NAME_AUTOMOUNT
public static final String SERIALIZED_NAME_AUTOMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DATACENTER
public static final String SERIALIZED_NAME_DATACENTER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IMAGE
public static final String SERIALIZED_NAME_IMAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LABELS
public static final String SERIALIZED_NAME_LABELS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LOCATION
public static final String SERIALIZED_NAME_LOCATION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NETWORKS
public static final String SERIALIZED_NAME_NETWORKS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PLACEMENT_GROUP
public static final String SERIALIZED_NAME_PLACEMENT_GROUP
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PUBLIC_NET
public static final String SERIALIZED_NAME_PUBLIC_NET
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SERVER_TYPE
public static final String SERIALIZED_NAME_SERVER_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SSH_KEYS
public static final String SERIALIZED_NAME_SSH_KEYS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_START_AFTER_CREATE
public static final String SERIALIZED_NAME_START_AFTER_CREATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_USER_DATA
public static final String SERIALIZED_NAME_USER_DATA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VOLUMES
public static final String SERIALIZED_NAME_VOLUMES
- See Also:
- Constant Field Values
-
-
Method Detail
-
automount
public CreateServerRequest automount(Boolean automount)
-
getAutomount
@Nullable public Boolean getAutomount()
Auto-mount Volumes after attach- Returns:
- automount
-
setAutomount
public void setAutomount(Boolean automount)
-
datacenter
public CreateServerRequest datacenter(String datacenter)
-
getDatacenter
@Nullable public String getDatacenter()
ID or name of Datacenter to create Server in (must not be used together with location)- Returns:
- datacenter
-
setDatacenter
public void setDatacenter(String datacenter)
-
image
public CreateServerRequest image(String image)
-
getImage
@Nullable public String getImage()
ID or name of the Image the Server is created from- Returns:
- image
-
setImage
public void setImage(String image)
-
labels
public CreateServerRequest labels(Map<String,String> labels)
-
putLabelsItem
public CreateServerRequest putLabelsItem(String key, String labelsItem)
-
getLabels
@Nullable public Map<String,String> getLabels()
User-defined labels (key-value pairs)- Returns:
- labels
-
location
public CreateServerRequest location(String location)
-
getLocation
@Nullable public String getLocation()
ID or name of Location to create Server in (must not be used together with datacenter)- Returns:
- location
-
setLocation
public void setLocation(String location)
-
name
public CreateServerRequest name(String name)
-
getName
@Nullable public String getName()
Name of the Server to create (must be unique per Project and a valid hostname as per RFC 1123)- Returns:
- name
-
setName
public void setName(String name)
-
networks
public CreateServerRequest networks(List<Long> networks)
-
addNetworksItem
public CreateServerRequest addNetworksItem(Long networksItem)
-
getNetworks
@Nullable public List<Long> getNetworks()
Network IDs which should be attached to the Server private network interface at the creation time- Returns:
- networks
-
placementGroup
public CreateServerRequest placementGroup(Long placementGroup)
-
getPlacementGroup
@Nullable public Long getPlacementGroup()
ID of the Placement Group the server should be in- Returns:
- placementGroup
-
setPlacementGroup
public void setPlacementGroup(Long placementGroup)
-
publicNet
public CreateServerRequest publicNet(PublicNetRequest publicNet)
-
getPublicNet
@Nullable public PublicNetRequest getPublicNet()
Get publicNet- Returns:
- publicNet
-
setPublicNet
public void setPublicNet(PublicNetRequest publicNet)
-
serverType
public CreateServerRequest serverType(String serverType)
-
getServerType
@Nullable public String getServerType()
ID or name of the Server type this Server should be created with- Returns:
- serverType
-
setServerType
public void setServerType(String serverType)
-
sshKeys
public CreateServerRequest sshKeys(List<String> sshKeys)
-
addSshKeysItem
public CreateServerRequest addSshKeysItem(String sshKeysItem)
-
getSshKeys
@Nullable public List<String> getSshKeys()
SSH key IDs (`long`) or names (`string`) which should be injected into the Server at creation time- Returns:
- sshKeys
-
startAfterCreate
public CreateServerRequest startAfterCreate(Boolean startAfterCreate)
-
getStartAfterCreate
@Nullable public Boolean getStartAfterCreate()
Start Server right after creation. Defaults to true.- Returns:
- startAfterCreate
-
setStartAfterCreate
public void setStartAfterCreate(Boolean startAfterCreate)
-
userData
public CreateServerRequest userData(String userData)
-
getUserData
@Nullable public String getUserData()
Cloud-Init user data to use during Server creation. This field is limited to 32KiB.- Returns:
- userData
-
setUserData
public void setUserData(String userData)
-
volumes
public CreateServerRequest volumes(List<Long> volumes)
-
addVolumesItem
public CreateServerRequest addVolumesItem(Long volumesItem)
-
getVolumes
@Nullable public List<Long> getVolumes()
Volume IDs which should be attached to the Server at the creation time. Volumes must be in the same Location.- Returns:
- volumes
-
-