google_cloudevents/google/events/firebase/analytics/v1/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
// This file is @generated by prost-build.
/// The data within Firebase Analytics log events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyticsLogData {
    /// User related dimensions.
    #[prost(message, optional, tag = "1")]
    pub user_dim: ::core::option::Option<UserDimensions>,
    /// A repeated record of event related dimensions.
    #[prost(message, repeated, tag = "2")]
    pub event_dim: ::prost::alloc::vec::Vec<EventDimensions>,
}
/// Message containing information about the user associated with the event.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserDimensions {
    /// The user ID set via the setUserId API.
    #[prost(string, tag = "1")]
    pub user_id: ::prost::alloc::string::String,
    /// The time (in microseconds) at which the user first opened the app.
    #[prost(int64, tag = "2")]
    pub first_open_timestamp_micros: i64,
    /// A repeated record of user properties set with the setUserProperty API.
    /// <https://firebase.google.com/docs/analytics/android/properties>
    #[prost(map = "string, message", tag = "3")]
    pub user_properties: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        UserPropertyValue,
    >,
    /// Device information.
    #[prost(message, optional, tag = "4")]
    pub device_info: ::core::option::Option<DeviceInfo>,
    /// User's geographic information.
    #[prost(message, optional, tag = "5")]
    pub geo_info: ::core::option::Option<GeoInfo>,
    /// App information.
    #[prost(message, optional, tag = "6")]
    pub app_info: ::core::option::Option<AppInfo>,
    /// Information about marketing campaign which acquired the user.
    #[prost(message, optional, tag = "7")]
    pub traffic_source: ::core::option::Option<TrafficSource>,
    /// Information regarding the bundle in which these events were uploaded.
    #[prost(message, optional, tag = "8")]
    pub bundle_info: ::core::option::Option<ExportBundleInfo>,
    /// Lifetime Value information about this user.
    #[prost(message, optional, tag = "9")]
    pub ltv_info: ::core::option::Option<LtvInfo>,
}
/// Predefined (eg: LTV) or custom properties (eg: birthday) stored on client
/// side and associated with subsequent HitBundles.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserPropertyValue {
    /// Last set value of user property.
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<AnalyticsValue>,
    /// UTC client time when user property was last set.
    #[prost(int64, tag = "2")]
    pub set_timestamp_usec: i64,
    /// Index for user property (one-based).
    #[prost(int32, tag = "3")]
    pub index: i32,
}
/// Value for Event Params and UserProperty can be of type string or int or
/// float or double.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyticsValue {
    #[prost(oneof = "analytics_value::ParamValue", tags = "1, 2, 3, 4")]
    pub param_value: ::core::option::Option<analytics_value::ParamValue>,
}
/// Nested message and enum types in `AnalyticsValue`.
pub mod analytics_value {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[serde(rename_all = "snake_case")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ParamValue {
        #[prost(string, tag = "1")]
        StringValue(::prost::alloc::string::String),
        #[prost(int64, tag = "2")]
        IntValue(i64),
        #[prost(float, tag = "3")]
        FloatValue(f32),
        #[prost(double, tag = "4")]
        DoubleValue(f64),
    }
}
/// Message containing device informations.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceInfo {
    /// Device category.
    /// Eg. tablet or mobile.
    #[prost(string, tag = "1")]
    pub device_category: ::prost::alloc::string::String,
    /// Device brand name.
    /// Eg. Samsung, HTC, etc.
    #[prost(string, tag = "2")]
    pub mobile_brand_name: ::prost::alloc::string::String,
    /// Device model name.
    /// Eg. GT-I9192
    #[prost(string, tag = "3")]
    pub mobile_model_name: ::prost::alloc::string::String,
    /// Device marketing name.
    /// Eg. Galaxy S4 Mini
    #[prost(string, tag = "4")]
    pub mobile_marketing_name: ::prost::alloc::string::String,
    /// Device model.
    /// Eg. GT-I9192
    #[prost(string, tag = "12")]
    pub device_model: ::prost::alloc::string::String,
    /// Device OS version when data capture ended.
    /// Eg. 4.4.2
    #[prost(string, tag = "6")]
    pub platform_version: ::prost::alloc::string::String,
    /// Vendor specific device identifier. This is IDFV on iOS. Not used for
    /// Android.
    /// Example: "599F9C00-92DC-4B5C-9464-7971F01F8370"
    #[prost(string, tag = "7")]
    pub device_id: ::prost::alloc::string::String,
    /// The type of the resettable_device_id is always IDFA on iOS and AdId
    /// on Android.
    /// Example: "71683BF9-FA3B-4B0D-9535-A1F05188BAF3"
    #[prost(string, tag = "8")]
    pub resettable_device_id: ::prost::alloc::string::String,
    /// The user language.
    /// Eg. "en-us", "en-za", "zh-tw", "jp"
    #[prost(string, tag = "9")]
    pub user_default_language: ::prost::alloc::string::String,
    /// The timezone of the device when data was uploaded as seconds skew from UTC.
    #[prost(int32, tag = "10")]
    pub device_time_zone_offset_seconds: i32,
    /// The device's Limit Ad Tracking setting.
    /// When true, we cannot use device_id for remarketing, demographics or
    /// influencing ads serving behaviour. However, we can use device_id for
    /// conversion tracking and campaign attribution.
    #[prost(bool, tag = "11")]
    pub limited_ad_tracking: bool,
}
/// Message which contains App Information.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppInfo {
    /// The app's version name
    /// Examples: "1.0", "4.3.1.1.213361", "2.3 (1824253)", "v1.8b22p6"
    #[prost(string, tag = "1")]
    pub app_version: ::prost::alloc::string::String,
    /// Unique id for this instance of the app.
    /// Example: "71683BF9FA3B4B0D9535A1F05188BAF3"
    #[prost(string, tag = "2")]
    pub app_instance_id: ::prost::alloc::string::String,
    /// The identifier of the store that installed the app.
    /// Eg. "com.sec.android.app.samsungapps", "com.amazon.venezia",
    /// "com.nokia.nstore"
    #[prost(string, tag = "3")]
    pub app_store: ::prost::alloc::string::String,
    /// The app platform.
    /// Eg "ANDROID", "IOS".
    #[prost(string, tag = "4")]
    pub app_platform: ::prost::alloc::string::String,
    /// Unique application identifier within an app store.
    #[prost(string, tag = "5")]
    pub app_id: ::prost::alloc::string::String,
}
/// User's geographic informaiton.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoInfo {
    /// The geographic continent.
    /// Eg. Americas
    #[prost(string, tag = "1")]
    pub continent: ::prost::alloc::string::String,
    /// The geographic country.
    /// Eg. Brazil
    #[prost(string, tag = "2")]
    pub country: ::prost::alloc::string::String,
    /// The geographic region.
    /// Eg. State of Sao Paulo
    #[prost(string, tag = "3")]
    pub region: ::prost::alloc::string::String,
    /// The geographic city.
    /// Eg. Sao Paulo
    #[prost(string, tag = "4")]
    pub city: ::prost::alloc::string::String,
}
/// Mesage containing marketing campaign information which acquired the user.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TrafficSource {
    /// The name of the campaign which acquired the user.
    #[prost(string, tag = "2")]
    pub user_acquired_campaign: ::prost::alloc::string::String,
    /// The name of the network which acquired the user.
    #[prost(string, tag = "3")]
    pub user_acquired_source: ::prost::alloc::string::String,
    /// The name of the medium which acquired the user.
    #[prost(string, tag = "4")]
    pub user_acquired_medium: ::prost::alloc::string::String,
}
/// Message containing information regarding the bundle in which these
/// events were uploaded.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExportBundleInfo {
    /// Monotonically increasing index for each bundle set by SDK.
    #[prost(int32, tag = "1")]
    pub bundle_sequence_id: i32,
    /// Timestamp offset between collection time and upload time.
    #[prost(int64, tag = "2")]
    pub server_timestamp_offset_micros: i64,
}
/// Lifetime Value information about this user.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LtvInfo {
    /// The Lifetime Value revenue of this user.
    #[prost(double, tag = "1")]
    pub revenue: f64,
    /// The currency corresponding to the revenue.
    #[prost(string, tag = "2")]
    pub currency: ::prost::alloc::string::String,
}
/// Message containing information pertaining to the event.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDimensions {
    /// The date on which this event was logged.
    /// (YYYYMMDD format in the registered timezone of your app.)
    #[prost(string, tag = "6")]
    pub date: ::prost::alloc::string::String,
    /// The name of this event.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// A repeated record of the parameters associated with this event.
    #[prost(map = "string, message", tag = "2")]
    pub params: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        AnalyticsValue,
    >,
    /// UTC client time when the event happened.
    #[prost(int64, tag = "4")]
    pub timestamp_micros: i64,
    /// UTC client time when the previous event happened.
    #[prost(int64, tag = "5")]
    pub previous_timestamp_micros: i64,
    /// Value param in USD.
    #[prost(double, tag = "7")]
    pub value_in_usd: f64,
}
/// The CloudEvent raised when a Firebase Analytics log is written.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyticsLogWrittenEvent {
    /// The data associated with the event.
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<AnalyticsLogData>,
}