/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ListPlacementGroupsResponse : Response to GET https://api.hetzner.cloud/v1/placement_groups
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListPlacementGroupsResponse {
    #[serde(rename = "meta")]
    pub meta: Box<models::Meta>,
    #[serde(rename = "placement_groups")]
    pub placement_groups: Vec<models::PlacementGroup>,
}

impl ListPlacementGroupsResponse {
    /// Response to GET https://api.hetzner.cloud/v1/placement_groups
    pub fn new(
        meta: models::Meta,
        placement_groups: Vec<models::PlacementGroup>,
    ) -> ListPlacementGroupsResponse {
        ListPlacementGroupsResponse {
            meta: Box::new(meta),
            placement_groups,
        }
    }
}
