1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
/*
* 3DS OUTSCALE API
*
* Welcome to the OUTSCALE API documentation.<br /> The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.<br /><br /> You can learn more about errors returned by the API in the dedicated [errors page](api/errors).<br /><br /> Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/OUTSCALE-APIs-Reference.html) between AWS and the OUTSCALE API.<br /> You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.<br /><br /> An OpenAPI description of the OUTSCALE API is also available in this [GitHub repository](https://github.com/outscale/osc-api).
*
* The version of the OpenAPI document: 1.22
* Contact: support@outscale.com
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LinkPublicIpRequest {
/// If true, allows the public IP to be associated with the VM or NIC that you specify even if it is already associated with another VM or NIC. If false, prevents the EIP from being associated with the VM or NIC that you specify if it is already associated with another VM or NIC. (By default, true in the public Cloud, false in a Net.)
#[serde(rename = "AllowRelink", skip_serializing_if = "Option::is_none")]
pub allow_relink: Option<bool>,
/// If true, checks whether you have the required permissions to perform the action.
#[serde(rename = "DryRun", skip_serializing_if = "Option::is_none")]
pub dry_run: Option<bool>,
/// (Net only) The ID of the NIC. This parameter is required if the VM has more than one NIC attached. Otherwise, you need to specify the `VmId` parameter instead. You cannot specify both parameters at the same time.
#[serde(rename = "NicId", skip_serializing_if = "Option::is_none")]
pub nic_id: Option<String>,
/// (Net only) The primary or secondary private IP of the specified NIC. By default, the primary private IP.
#[serde(rename = "PrivateIp", skip_serializing_if = "Option::is_none")]
pub private_ip: Option<String>,
/// The public IP. This parameter is required unless you use the `PublicIpId` parameter.
#[serde(rename = "PublicIp", skip_serializing_if = "Option::is_none")]
pub public_ip: Option<String>,
/// The allocation ID of the public IP. This parameter is required unless you use the `PublicIp` parameter.
#[serde(rename = "PublicIpId", skip_serializing_if = "Option::is_none")]
pub public_ip_id: Option<String>,
/// The ID of the VM.<br /> - In the public Cloud, this parameter is required.<br /> - In a Net, this parameter is required if the VM has only one NIC. Otherwise, you need to specify the `NicId` parameter instead. You cannot specify both parameters at the same time.
#[serde(rename = "VmId", skip_serializing_if = "Option::is_none")]
pub vm_id: Option<String>,
}
impl LinkPublicIpRequest {
pub fn new() -> LinkPublicIpRequest {
LinkPublicIpRequest {
allow_relink: None,
dry_run: None,
nic_id: None,
private_ip: None,
public_ip: None,
public_ip_id: None,
vm_id: None,
}
}
}