/*
* 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.146.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// GoogleAdsHierarchyClient : A Google Ads account inside a manager tree.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GoogleAdsHierarchyClient {
/// Native Google Ads customer id, digits only.
#[serde(rename = "customerId", skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
/// Null for a pending invitation.
#[serde(
rename = "name",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub name: Option<Option<String>>,
#[serde(
rename = "currency",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub currency: Option<Option<String>>,
#[serde(
rename = "timeZone",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub time_zone: Option<Option<String>>,
/// True for a sub-manager account.
#[serde(rename = "manager", skip_serializing_if = "Option::is_none")]
pub manager: Option<bool>,
#[serde(rename = "testAccount", skip_serializing_if = "Option::is_none")]
pub test_account: Option<bool>,
/// Hidden in the manager's Google Ads UI.
#[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
pub hidden: Option<bool>,
/// Distance from the root (1 = direct client of the root).
#[serde(rename = "level", skip_serializing_if = "Option::is_none")]
pub level: Option<i32>,
/// Google customer status: ENABLED, CANCELED, SUSPENDED or CLOSED. Null for a pending invitation.
#[serde(
rename = "status",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub status: Option<Option<String>>,
/// Direct manager of this account. Null only when more than 50 managers under the root were skipped.
#[serde(
rename = "parentCustomerId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub parent_customer_id: Option<Option<String>>,
/// Id of the link to the parent, used by PATCH /v1/ads/accounts/manager-links.
#[serde(
rename = "managerLinkId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub manager_link_id: Option<Option<String>>,
#[serde(
rename = "linkStatus",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub link_status: Option<Option<LinkStatus>>,
}
impl GoogleAdsHierarchyClient {
/// A Google Ads account inside a manager tree.
pub fn new() -> GoogleAdsHierarchyClient {
GoogleAdsHierarchyClient {
customer_id: None,
name: None,
currency: None,
time_zone: None,
manager: None,
test_account: None,
hidden: None,
level: None,
status: None,
parent_customer_id: None,
manager_link_id: None,
link_status: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LinkStatus {
#[serde(rename = "ACTIVE")]
Active,
#[serde(rename = "PENDING")]
Pending,
}
impl Default for LinkStatus {
fn default() -> LinkStatus {
Self::Active
}
}