/*
* Fastly API
*
* Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
*
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct LoggingGooglePubsubResponse {
/// The name for the real-time logging configuration.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
#[serde(rename = "placement", skip_serializing_if = "Option::is_none")]
pub placement: Option<Placement>,
/// The name of an existing condition in the configured endpoint, or leave blank to always execute.
#[serde(rename = "response_condition", skip_serializing_if = "Option::is_none")]
pub response_condition: Option<String>,
/// A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
#[serde(rename = "format", skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
/// The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
#[serde(rename = "log_processing_region", skip_serializing_if = "Option::is_none")]
pub log_processing_region: Option<LogProcessingRegion>,
/// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
#[serde(rename = "format_version", skip_serializing_if = "Option::is_none")]
pub format_version: Option<FormatVersion>,
/// Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
pub user: Option<String>,
/// Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
#[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")]
pub secret_key: Option<String>,
/// The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
#[serde(rename = "account_name", skip_serializing_if = "Option::is_none")]
pub account_name: Option<String>,
/// The Google Cloud Pub/Sub topic to which logs will be published. Required.
#[serde(rename = "topic", skip_serializing_if = "Option::is_none")]
pub topic: Option<String>,
/// Your Google Cloud Platform project ID. Required
#[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
pub project_id: Option<String>,
/// Date and time in ISO 8601 format.
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// Date and time in ISO 8601 format.
#[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
pub deleted_at: Option<String>,
/// Date and time in ISO 8601 format.
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
#[serde(rename = "service_id", skip_serializing_if = "Option::is_none")]
pub service_id: Option<Box<String>>,
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<Box<String>>,
}
impl LoggingGooglePubsubResponse {
pub fn new() -> LoggingGooglePubsubResponse {
LoggingGooglePubsubResponse {
name: None,
placement: None,
response_condition: None,
format: None,
log_processing_region: None,
format_version: None,
user: None,
secret_key: None,
account_name: None,
topic: None,
project_id: None,
created_at: None,
deleted_at: None,
updated_at: None,
service_id: None,
version: None,
}
}
}
/// Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Placement {
#[serde(rename = "none")]
None,
#[serde(rename = "null")]
Null,
}
impl Default for Placement {
fn default() -> Placement {
Self::None
}
}
/// The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LogProcessingRegion {
#[serde(rename = "none")]
None,
#[serde(rename = "eu")]
Eu,
#[serde(rename = "us")]
Us,
}
impl Default for LogProcessingRegion {
fn default() -> LogProcessingRegion {
Self::None
}
}
/// The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FormatVersion {
#[serde(rename = "1")]
V1,
#[serde(rename = "2")]
V2,
}
impl Default for FormatVersion {
fn default() -> FormatVersion {
Self::V1
}
}