late 0.0.1066

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.108.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GooglePmaxAssetGroup {
    /// Stable Google asset group id. Use it in the asset-group endpoints below.
    #[serde(rename = "id")]
    pub id: String,
    /// customers/{customerId}/assetGroups/{assetGroupId}
    #[serde(rename = "resourceName")]
    pub resource_name: String,
    #[serde(rename = "campaignId")]
    pub campaign_id: String,
    #[serde(rename = "name")]
    pub name: String,
    /// Asset-group status on Google. Campaign status independently controls delivery.
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "finalUrls")]
    pub final_urls: Vec<String>,
    #[serde(rename = "finalMobileUrls")]
    pub final_mobile_urls: Vec<String>,
    #[serde(rename = "path1", deserialize_with = "Option::deserialize")]
    pub path1: Option<String>,
    #[serde(rename = "path2", deserialize_with = "Option::deserialize")]
    pub path2: Option<String>,
    /// Google ad strength, such as POOR, AVERAGE, GOOD or EXCELLENT.
    #[serde(rename = "adStrength", deserialize_with = "Option::deserialize")]
    pub ad_strength: Option<String>,
    /// Why the group is or is not serving, such as ELIGIBLE, PAUSED or NOT_ELIGIBLE.
    #[serde(rename = "primaryStatus", deserialize_with = "Option::deserialize")]
    pub primary_status: Option<String>,
    #[serde(rename = "primaryStatusReasons")]
    pub primary_status_reasons: Vec<String>,
    #[serde(rename = "assets")]
    pub assets: Vec<models::GooglePmaxAssetGroupAssetsInner>,
}

impl GooglePmaxAssetGroup {
    pub fn new(
        id: String,
        resource_name: String,
        campaign_id: String,
        name: String,
        status: String,
        final_urls: Vec<String>,
        final_mobile_urls: Vec<String>,
        path1: Option<String>,
        path2: Option<String>,
        ad_strength: Option<String>,
        primary_status: Option<String>,
        primary_status_reasons: Vec<String>,
        assets: Vec<models::GooglePmaxAssetGroupAssetsInner>,
    ) -> GooglePmaxAssetGroup {
        GooglePmaxAssetGroup {
            id,
            resource_name,
            campaign_id,
            name,
            status,
            final_urls,
            final_mobile_urls,
            path1,
            path2,
            ad_strength,
            primary_status,
            primary_status_reasons,
            assets,
        }
    }
}