pub struct CreatePrimaryIpRequest {
pub assignee_id: Option<i64>,
pub assignee_type: AssigneeType,
pub auto_delete: Option<bool>,
pub datacenter: Option<String>,
pub labels: Option<HashMap<String, String>>,
pub name: String,
pub type: IpType,
}
Expand description
CreatePrimaryIpRequest : Request for POST https://api.hetzner.cloud/v1/primary_ips
Fields§
§assignee_id: Option<i64>
ID of the resource the Primary IP should be assigned to. Omitted if it should not be assigned.
assignee_type: AssigneeType
Resource type the Primary IP can be assigned to
auto_delete: Option<bool>
Delete the Primary IP when the Server it is assigned to is deleted.
datacenter: Option<String>
ID or name of Datacenter the Primary IP will be bound to. Needs to be omitted if assignee_id
is passed.
labels: Option<HashMap<String, String>>
User-defined labels (key-value pairs)
name: String
§type: IpType
Implementations§
source§impl CreatePrimaryIpRequest
impl CreatePrimaryIpRequest
sourcepub fn new(
assignee_type: AssigneeType,
name: String,
type: IpType
) -> CreatePrimaryIpRequest
pub fn new( assignee_type: AssigneeType, name: String, type: IpType ) -> CreatePrimaryIpRequest
Request for POST https://api.hetzner.cloud/v1/primary_ips
Trait Implementations§
source§impl Clone for CreatePrimaryIpRequest
impl Clone for CreatePrimaryIpRequest
source§fn clone(&self) -> CreatePrimaryIpRequest
fn clone(&self) -> CreatePrimaryIpRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreatePrimaryIpRequest
impl Debug for CreatePrimaryIpRequest
source§impl Default for CreatePrimaryIpRequest
impl Default for CreatePrimaryIpRequest
source§fn default() -> CreatePrimaryIpRequest
fn default() -> CreatePrimaryIpRequest
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CreatePrimaryIpRequest
impl<'de> Deserialize<'de> for CreatePrimaryIpRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for CreatePrimaryIpRequest
impl PartialEq for CreatePrimaryIpRequest
source§fn eq(&self, other: &CreatePrimaryIpRequest) -> bool
fn eq(&self, other: &CreatePrimaryIpRequest) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CreatePrimaryIpRequest
impl Serialize for CreatePrimaryIpRequest
impl StructuralPartialEq for CreatePrimaryIpRequest
Auto Trait Implementations§
impl RefUnwindSafe for CreatePrimaryIpRequest
impl Send for CreatePrimaryIpRequest
impl Sync for CreatePrimaryIpRequest
impl Unpin for CreatePrimaryIpRequest
impl UnwindSafe for CreatePrimaryIpRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more