use serde::{Deserialize, Serialize}; /*
                                      * Service Control API
                                      *
                                      * Provides admission control and telemetry reporting for services integrated with Service Infrastructure.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::servicecontrol_v1::models;

/// ServiceMetadata : Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ServiceMetadata {
    /// Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.
    #[serde(rename = "jobMetadata", skip_serializing_if = "Option::is_none")]
    pub job_metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]` If the identity is a Google account (e.g. workspace user account or service account), this will be the email of the prefixed by `serviceAccount:`. For example: `serviceAccount:my-service-account@project-1.iam.gserviceaccount.com`. If the identity is an individual user, the identity will be formatted as: `user:user_ABC@email.com`.
    #[serde(rename = "principalSubject", skip_serializing_if = "Option::is_none")]
    pub principal_subject: Option<String>,
    /// The service's fully qualified domain name, e.g. \"dataproc.googleapis.com\".
    #[serde(rename = "serviceDomain", skip_serializing_if = "Option::is_none")]
    pub service_domain: Option<String>,
}

impl ServiceMetadata {
    /// Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.
    pub fn new() -> ServiceMetadata {
        ServiceMetadata {
            job_metadata: None,
            principal_subject: None,
            service_domain: None,
        }
    }
}
