analytics_admin.proto 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.analytics.admin.v1beta;
  16. import "google/analytics/admin/v1beta/resources.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. import "google/api/resource.proto";
  21. import "google/protobuf/empty.proto";
  22. import "google/protobuf/field_mask.proto";
  23. import "google/protobuf/timestamp.proto";
  24. option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "AnalyticsAdminProto";
  27. option java_package = "com.google.analytics.admin.v1beta";
  28. // Service Interface for the Analytics Admin API (GA4).
  29. service AnalyticsAdminService {
  30. option (google.api.default_host) = "analyticsadmin.googleapis.com";
  31. option (google.api.oauth_scopes) =
  32. "https://www.googleapis.com/auth/analytics.edit,"
  33. "https://www.googleapis.com/auth/analytics.readonly";
  34. // Lookup for a single Account.
  35. rpc GetAccount(GetAccountRequest) returns (Account) {
  36. option (google.api.http) = {
  37. get: "/v1beta/{name=accounts/*}"
  38. };
  39. option (google.api.method_signature) = "name";
  40. }
  41. // Returns all accounts accessible by the caller.
  42. //
  43. // Note that these accounts might not currently have GA4 properties.
  44. // Soft-deleted (ie: "trashed") accounts are excluded by default.
  45. // Returns an empty list if no relevant accounts are found.
  46. rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) {
  47. option (google.api.http) = {
  48. get: "/v1beta/accounts"
  49. };
  50. }
  51. // Marks target Account as soft-deleted (ie: "trashed") and returns it.
  52. //
  53. // This API does not have a method to restore soft-deleted accounts.
  54. // However, they can be restored using the Trash Can UI.
  55. //
  56. // If the accounts are not restored before the expiration time, the account
  57. // and all child resources (eg: Properties, GoogleAdsLinks, Streams,
  58. // UserLinks) will be permanently purged.
  59. // https://support.google.com/analytics/answer/6154772
  60. //
  61. // Returns an error if the target is not found.
  62. rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) {
  63. option (google.api.http) = {
  64. delete: "/v1beta/{name=accounts/*}"
  65. };
  66. option (google.api.method_signature) = "name";
  67. }
  68. // Updates an account.
  69. rpc UpdateAccount(UpdateAccountRequest) returns (Account) {
  70. option (google.api.http) = {
  71. patch: "/v1beta/{account.name=accounts/*}"
  72. body: "account"
  73. };
  74. option (google.api.method_signature) = "account,update_mask";
  75. }
  76. // Requests a ticket for creating an account.
  77. rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) {
  78. option (google.api.http) = {
  79. post: "/v1beta/accounts:provisionAccountTicket"
  80. body: "*"
  81. };
  82. }
  83. // Returns summaries of all accounts accessible by the caller.
  84. rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) {
  85. option (google.api.http) = {
  86. get: "/v1beta/accountSummaries"
  87. };
  88. }
  89. // Lookup for a single "GA4" Property.
  90. rpc GetProperty(GetPropertyRequest) returns (Property) {
  91. option (google.api.http) = {
  92. get: "/v1beta/{name=properties/*}"
  93. };
  94. option (google.api.method_signature) = "name";
  95. }
  96. // Returns child Properties under the specified parent Account.
  97. //
  98. // Only "GA4" properties will be returned.
  99. // Properties will be excluded if the caller does not have access.
  100. // Soft-deleted (ie: "trashed") properties are excluded by default.
  101. // Returns an empty list if no relevant properties are found.
  102. rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse) {
  103. option (google.api.http) = {
  104. get: "/v1beta/properties"
  105. };
  106. }
  107. // Creates an "GA4" property with the specified location and attributes.
  108. rpc CreateProperty(CreatePropertyRequest) returns (Property) {
  109. option (google.api.http) = {
  110. post: "/v1beta/properties"
  111. body: "property"
  112. };
  113. option (google.api.method_signature) = "property";
  114. }
  115. // Marks target Property as soft-deleted (ie: "trashed") and returns it.
  116. //
  117. // This API does not have a method to restore soft-deleted properties.
  118. // However, they can be restored using the Trash Can UI.
  119. //
  120. // If the properties are not restored before the expiration time, the Property
  121. // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
  122. // will be permanently purged.
  123. // https://support.google.com/analytics/answer/6154772
  124. //
  125. // Returns an error if the target is not found, or is not an GA4 Property.
  126. rpc DeleteProperty(DeletePropertyRequest) returns (Property) {
  127. option (google.api.http) = {
  128. delete: "/v1beta/{name=properties/*}"
  129. };
  130. option (google.api.method_signature) = "name";
  131. }
  132. // Updates a property.
  133. rpc UpdateProperty(UpdatePropertyRequest) returns (Property) {
  134. option (google.api.http) = {
  135. patch: "/v1beta/{property.name=properties/*}"
  136. body: "property"
  137. };
  138. option (google.api.method_signature) = "property,update_mask";
  139. }
  140. // Creates a FirebaseLink.
  141. //
  142. // Properties can have at most one FirebaseLink.
  143. rpc CreateFirebaseLink(CreateFirebaseLinkRequest) returns (FirebaseLink) {
  144. option (google.api.http) = {
  145. post: "/v1beta/{parent=properties/*}/firebaseLinks"
  146. body: "firebase_link"
  147. };
  148. option (google.api.method_signature) = "parent,firebase_link";
  149. }
  150. // Deletes a FirebaseLink on a property
  151. rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) {
  152. option (google.api.http) = {
  153. delete: "/v1beta/{name=properties/*/firebaseLinks/*}"
  154. };
  155. option (google.api.method_signature) = "name";
  156. }
  157. // Lists FirebaseLinks on a property.
  158. // Properties can have at most one FirebaseLink.
  159. rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) {
  160. option (google.api.http) = {
  161. get: "/v1beta/{parent=properties/*}/firebaseLinks"
  162. };
  163. option (google.api.method_signature) = "parent";
  164. }
  165. // Creates a GoogleAdsLink.
  166. rpc CreateGoogleAdsLink(CreateGoogleAdsLinkRequest) returns (GoogleAdsLink) {
  167. option (google.api.http) = {
  168. post: "/v1beta/{parent=properties/*}/googleAdsLinks"
  169. body: "google_ads_link"
  170. };
  171. option (google.api.method_signature) = "parent,google_ads_link";
  172. }
  173. // Updates a GoogleAdsLink on a property
  174. rpc UpdateGoogleAdsLink(UpdateGoogleAdsLinkRequest) returns (GoogleAdsLink) {
  175. option (google.api.http) = {
  176. patch: "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}"
  177. body: "google_ads_link"
  178. };
  179. option (google.api.method_signature) = "google_ads_link,update_mask";
  180. }
  181. // Deletes a GoogleAdsLink on a property
  182. rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) {
  183. option (google.api.http) = {
  184. delete: "/v1beta/{name=properties/*/googleAdsLinks/*}"
  185. };
  186. option (google.api.method_signature) = "name";
  187. }
  188. // Lists GoogleAdsLinks on a property.
  189. rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) {
  190. option (google.api.http) = {
  191. get: "/v1beta/{parent=properties/*}/googleAdsLinks"
  192. };
  193. option (google.api.method_signature) = "parent";
  194. }
  195. // Get data sharing settings on an account.
  196. // Data sharing settings are singletons.
  197. rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings) {
  198. option (google.api.http) = {
  199. get: "/v1beta/{name=accounts/*/dataSharingSettings}"
  200. };
  201. option (google.api.method_signature) = "name";
  202. }
  203. // Lookup for a single "GA4" MeasurementProtocolSecret.
  204. rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) {
  205. option (google.api.http) = {
  206. get: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}"
  207. };
  208. option (google.api.method_signature) = "name";
  209. }
  210. // Returns child MeasurementProtocolSecrets under the specified parent
  211. // Property.
  212. rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse) {
  213. option (google.api.http) = {
  214. get: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets"
  215. };
  216. option (google.api.method_signature) = "parent";
  217. }
  218. // Creates a measurement protocol secret.
  219. rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) {
  220. option (google.api.http) = {
  221. post: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets"
  222. body: "measurement_protocol_secret"
  223. };
  224. option (google.api.method_signature) = "parent,measurement_protocol_secret";
  225. }
  226. // Deletes target MeasurementProtocolSecret.
  227. rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (google.protobuf.Empty) {
  228. option (google.api.http) = {
  229. delete: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}"
  230. };
  231. option (google.api.method_signature) = "name";
  232. }
  233. // Updates a measurement protocol secret.
  234. rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) {
  235. option (google.api.http) = {
  236. patch: "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}"
  237. body: "measurement_protocol_secret"
  238. };
  239. option (google.api.method_signature) = "measurement_protocol_secret,update_mask";
  240. }
  241. // Acknowledges the terms of user data collection for the specified property.
  242. //
  243. // This acknowledgement must be completed (either in the Google Analytics UI
  244. // or via this API) before MeasurementProtocolSecret resources may be created.
  245. rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) {
  246. option (google.api.http) = {
  247. post: "/v1beta/{property=properties/*}:acknowledgeUserDataCollection"
  248. body: "*"
  249. };
  250. }
  251. // Searches through all changes to an account or its children given the
  252. // specified set of filters.
  253. rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) {
  254. option (google.api.http) = {
  255. post: "/v1beta/{account=accounts/*}:searchChangeHistoryEvents"
  256. body: "*"
  257. };
  258. }
  259. // Creates a conversion event with the specified attributes.
  260. rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent) {
  261. option (google.api.http) = {
  262. post: "/v1beta/{parent=properties/*}/conversionEvents"
  263. body: "conversion_event"
  264. };
  265. option (google.api.method_signature) = "parent,conversion_event";
  266. }
  267. // Retrieve a single conversion event.
  268. rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) {
  269. option (google.api.http) = {
  270. get: "/v1beta/{name=properties/*/conversionEvents/*}"
  271. };
  272. option (google.api.method_signature) = "name";
  273. }
  274. // Deletes a conversion event in a property.
  275. rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (google.protobuf.Empty) {
  276. option (google.api.http) = {
  277. delete: "/v1beta/{name=properties/*/conversionEvents/*}"
  278. };
  279. option (google.api.method_signature) = "name";
  280. }
  281. // Returns a list of conversion events in the specified parent property.
  282. //
  283. // Returns an empty list if no conversion events are found.
  284. rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse) {
  285. option (google.api.http) = {
  286. get: "/v1beta/{parent=properties/*}/conversionEvents"
  287. };
  288. option (google.api.method_signature) = "parent";
  289. }
  290. // Creates a CustomDimension.
  291. rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension) {
  292. option (google.api.http) = {
  293. post: "/v1beta/{parent=properties/*}/customDimensions"
  294. body: "custom_dimension"
  295. };
  296. option (google.api.method_signature) = "parent,custom_dimension";
  297. }
  298. // Updates a CustomDimension on a property.
  299. rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension) {
  300. option (google.api.http) = {
  301. patch: "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}"
  302. body: "custom_dimension"
  303. };
  304. option (google.api.method_signature) = "custom_dimension,update_mask";
  305. }
  306. // Lists CustomDimensions on a property.
  307. rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse) {
  308. option (google.api.http) = {
  309. get: "/v1beta/{parent=properties/*}/customDimensions"
  310. };
  311. option (google.api.method_signature) = "parent";
  312. }
  313. // Archives a CustomDimension on a property.
  314. rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (google.protobuf.Empty) {
  315. option (google.api.http) = {
  316. post: "/v1beta/{name=properties/*/customDimensions/*}:archive"
  317. body: "*"
  318. };
  319. option (google.api.method_signature) = "name";
  320. }
  321. // Lookup for a single CustomDimension.
  322. rpc GetCustomDimension(GetCustomDimensionRequest) returns (CustomDimension) {
  323. option (google.api.http) = {
  324. get: "/v1beta/{name=properties/*/customDimensions/*}"
  325. };
  326. option (google.api.method_signature) = "name";
  327. }
  328. // Creates a CustomMetric.
  329. rpc CreateCustomMetric(CreateCustomMetricRequest) returns (CustomMetric) {
  330. option (google.api.http) = {
  331. post: "/v1beta/{parent=properties/*}/customMetrics"
  332. body: "custom_metric"
  333. };
  334. option (google.api.method_signature) = "parent,custom_metric";
  335. }
  336. // Updates a CustomMetric on a property.
  337. rpc UpdateCustomMetric(UpdateCustomMetricRequest) returns (CustomMetric) {
  338. option (google.api.http) = {
  339. patch: "/v1beta/{custom_metric.name=properties/*/customMetrics/*}"
  340. body: "custom_metric"
  341. };
  342. option (google.api.method_signature) = "custom_metric,update_mask";
  343. }
  344. // Lists CustomMetrics on a property.
  345. rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse) {
  346. option (google.api.http) = {
  347. get: "/v1beta/{parent=properties/*}/customMetrics"
  348. };
  349. option (google.api.method_signature) = "parent";
  350. }
  351. // Archives a CustomMetric on a property.
  352. rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (google.protobuf.Empty) {
  353. option (google.api.http) = {
  354. post: "/v1beta/{name=properties/*/customMetrics/*}:archive"
  355. body: "*"
  356. };
  357. option (google.api.method_signature) = "name";
  358. }
  359. // Lookup for a single CustomMetric.
  360. rpc GetCustomMetric(GetCustomMetricRequest) returns (CustomMetric) {
  361. option (google.api.http) = {
  362. get: "/v1beta/{name=properties/*/customMetrics/*}"
  363. };
  364. option (google.api.method_signature) = "name";
  365. }
  366. // Returns the singleton data retention settings for this property.
  367. rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings) {
  368. option (google.api.http) = {
  369. get: "/v1beta/{name=properties/*/dataRetentionSettings}"
  370. };
  371. option (google.api.method_signature) = "name";
  372. }
  373. // Updates the singleton data retention settings for this property.
  374. rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings) {
  375. option (google.api.http) = {
  376. patch: "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}"
  377. body: "data_retention_settings"
  378. };
  379. option (google.api.method_signature) = "data_retention_settings,update_mask";
  380. }
  381. // Creates a DataStream.
  382. rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream) {
  383. option (google.api.http) = {
  384. post: "/v1beta/{parent=properties/*}/dataStreams"
  385. body: "data_stream"
  386. };
  387. option (google.api.method_signature) = "parent,data_stream";
  388. }
  389. // Deletes a DataStream on a property.
  390. rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) {
  391. option (google.api.http) = {
  392. delete: "/v1beta/{name=properties/*/dataStreams/*}"
  393. };
  394. option (google.api.method_signature) = "name";
  395. }
  396. // Updates a DataStream on a property.
  397. rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream) {
  398. option (google.api.http) = {
  399. patch: "/v1beta/{data_stream.name=properties/*/dataStreams/*}"
  400. body: "data_stream"
  401. };
  402. option (google.api.method_signature) = "data_stream,update_mask";
  403. }
  404. // Lists DataStreams on a property.
  405. rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) {
  406. option (google.api.http) = {
  407. get: "/v1beta/{parent=properties/*}/dataStreams"
  408. };
  409. option (google.api.method_signature) = "parent";
  410. }
  411. // Lookup for a single DataStream.
  412. rpc GetDataStream(GetDataStreamRequest) returns (DataStream) {
  413. option (google.api.http) = {
  414. get: "/v1beta/{name=properties/*/dataStreams/*}"
  415. };
  416. option (google.api.method_signature) = "name";
  417. }
  418. }
  419. // Request message for GetAccount RPC.
  420. message GetAccountRequest {
  421. // Required. The name of the account to lookup.
  422. // Format: accounts/{account}
  423. // Example: "accounts/100"
  424. string name = 1 [
  425. (google.api.field_behavior) = REQUIRED,
  426. (google.api.resource_reference) = {
  427. type: "analyticsadmin.googleapis.com/Account"
  428. }
  429. ];
  430. }
  431. // Request message for ListAccounts RPC.
  432. message ListAccountsRequest {
  433. // The maximum number of resources to return. The service may return
  434. // fewer than this value, even if there are additional pages.
  435. // If unspecified, at most 50 resources will be returned.
  436. // The maximum value is 200; (higher values will be coerced to the maximum)
  437. int32 page_size = 1;
  438. // A page token, received from a previous `ListAccounts` call.
  439. // Provide this to retrieve the subsequent page.
  440. // When paginating, all other parameters provided to `ListAccounts` must
  441. // match the call that provided the page token.
  442. string page_token = 2;
  443. // Whether to include soft-deleted (ie: "trashed") Accounts in the
  444. // results. Accounts can be inspected to determine whether they are deleted or
  445. // not.
  446. bool show_deleted = 3;
  447. }
  448. // Request message for ListAccounts RPC.
  449. message ListAccountsResponse {
  450. // Results that were accessible to the caller.
  451. repeated Account accounts = 1;
  452. // A token, which can be sent as `page_token` to retrieve the next page.
  453. // If this field is omitted, there are no subsequent pages.
  454. string next_page_token = 2;
  455. }
  456. // Request message for DeleteAccount RPC.
  457. message DeleteAccountRequest {
  458. // Required. The name of the Account to soft-delete.
  459. // Format: accounts/{account}
  460. // Example: "accounts/100"
  461. string name = 1 [
  462. (google.api.field_behavior) = REQUIRED,
  463. (google.api.resource_reference) = {
  464. type: "analyticsadmin.googleapis.com/Account"
  465. }
  466. ];
  467. }
  468. // Request message for UpdateAccount RPC.
  469. message UpdateAccountRequest {
  470. // Required. The account to update.
  471. // The account's `name` field is used to identify the account.
  472. Account account = 1 [(google.api.field_behavior) = REQUIRED];
  473. // Required. The list of fields to be updated. Field names must be in snake case
  474. // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
  475. // the entire entity, use one path with the string "*" to match all fields.
  476. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  477. }
  478. // Request message for ProvisionAccountTicket RPC.
  479. message ProvisionAccountTicketRequest {
  480. // The account to create.
  481. Account account = 1;
  482. // Redirect URI where the user will be sent after accepting Terms of Service.
  483. // Must be configured in Developers Console as a Redirect URI
  484. string redirect_uri = 2;
  485. }
  486. // Response message for ProvisionAccountTicket RPC.
  487. message ProvisionAccountTicketResponse {
  488. // The param to be passed in the ToS link.
  489. string account_ticket_id = 1;
  490. }
  491. // Request message for GetProperty RPC.
  492. message GetPropertyRequest {
  493. // Required. The name of the property to lookup.
  494. // Format: properties/{property_id}
  495. // Example: "properties/1000"
  496. string name = 1 [
  497. (google.api.field_behavior) = REQUIRED,
  498. (google.api.resource_reference) = {
  499. type: "analyticsadmin.googleapis.com/Property"
  500. }
  501. ];
  502. }
  503. // Request message for ListProperties RPC.
  504. message ListPropertiesRequest {
  505. // Required. An expression for filtering the results of the request.
  506. // Fields eligible for filtering are:
  507. // `parent:`(The resource name of the parent account/property) or
  508. // `ancestor:`(The resource name of the parent account) or
  509. // `firebase_project:`(The id or number of the linked firebase project).
  510. // Some examples of filters:
  511. //
  512. // ```
  513. // | Filter | Description |
  514. // |-----------------------------|-------------------------------------------|
  515. // | parent:accounts/123 | The account with account id: 123. |
  516. // | parent:properties/123 | The property with property id: 123. |
  517. // | ancestor:accounts/123 | The account with account id: 123. |
  518. // | firebase_project:project-id | The firebase project with id: project-id. |
  519. // | firebase_project:123 | The firebase project with number: 123. |
  520. // ```
  521. string filter = 1 [(google.api.field_behavior) = REQUIRED];
  522. // The maximum number of resources to return. The service may return
  523. // fewer than this value, even if there are additional pages.
  524. // If unspecified, at most 50 resources will be returned.
  525. // The maximum value is 200; (higher values will be coerced to the maximum)
  526. int32 page_size = 2;
  527. // A page token, received from a previous `ListProperties` call.
  528. // Provide this to retrieve the subsequent page.
  529. // When paginating, all other parameters provided to `ListProperties` must
  530. // match the call that provided the page token.
  531. string page_token = 3;
  532. // Whether to include soft-deleted (ie: "trashed") Properties in the
  533. // results. Properties can be inspected to determine whether they are deleted
  534. // or not.
  535. bool show_deleted = 4;
  536. }
  537. // Response message for ListProperties RPC.
  538. message ListPropertiesResponse {
  539. // Results that matched the filter criteria and were accessible to the caller.
  540. repeated Property properties = 1;
  541. // A token, which can be sent as `page_token` to retrieve the next page.
  542. // If this field is omitted, there are no subsequent pages.
  543. string next_page_token = 2;
  544. }
  545. // Request message for UpdateProperty RPC.
  546. message UpdatePropertyRequest {
  547. // Required. The property to update.
  548. // The property's `name` field is used to identify the property to be
  549. // updated.
  550. Property property = 1 [(google.api.field_behavior) = REQUIRED];
  551. // Required. The list of fields to be updated. Field names must be in snake case
  552. // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
  553. // the entire entity, use one path with the string "*" to match all fields.
  554. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  555. }
  556. // Request message for CreateProperty RPC.
  557. message CreatePropertyRequest {
  558. // Required. The property to create.
  559. // Note: the supplied property must specify its parent.
  560. Property property = 1 [(google.api.field_behavior) = REQUIRED];
  561. }
  562. // Request message for DeleteProperty RPC.
  563. message DeletePropertyRequest {
  564. // Required. The name of the Property to soft-delete.
  565. // Format: properties/{property_id}
  566. // Example: "properties/1000"
  567. string name = 1 [
  568. (google.api.field_behavior) = REQUIRED,
  569. (google.api.resource_reference) = {
  570. type: "analyticsadmin.googleapis.com/Property"
  571. }
  572. ];
  573. }
  574. // Request message for CreateFirebaseLink RPC
  575. message CreateFirebaseLinkRequest {
  576. // Required. Format: properties/{property_id}
  577. // Example: properties/1234
  578. string parent = 1 [
  579. (google.api.field_behavior) = REQUIRED,
  580. (google.api.resource_reference) = {
  581. child_type: "analyticsadmin.googleapis.com/FirebaseLink"
  582. }
  583. ];
  584. // Required. The Firebase link to create.
  585. FirebaseLink firebase_link = 2 [(google.api.field_behavior) = REQUIRED];
  586. }
  587. // Request message for DeleteFirebaseLink RPC
  588. message DeleteFirebaseLinkRequest {
  589. // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id}
  590. // Example: properties/1234/firebaseLinks/5678
  591. string name = 1 [
  592. (google.api.field_behavior) = REQUIRED,
  593. (google.api.resource_reference) = {
  594. type: "analyticsadmin.googleapis.com/FirebaseLink"
  595. }
  596. ];
  597. }
  598. // Request message for ListFirebaseLinks RPC
  599. message ListFirebaseLinksRequest {
  600. // Required. Format: properties/{property_id}
  601. // Example: properties/1234
  602. string parent = 1 [
  603. (google.api.field_behavior) = REQUIRED,
  604. (google.api.resource_reference) = {
  605. child_type: "analyticsadmin.googleapis.com/FirebaseLink"
  606. }
  607. ];
  608. // The maximum number of resources to return. The service may return
  609. // fewer than this value, even if there are additional pages.
  610. // If unspecified, at most 50 resources will be returned.
  611. // The maximum value is 200; (higher values will be coerced to the maximum)
  612. int32 page_size = 2;
  613. // A page token, received from a previous `ListFirebaseLinks` call.
  614. // Provide this to retrieve the subsequent page.
  615. // When paginating, all other parameters provided to `ListProperties` must
  616. // match the call that provided the page token.
  617. string page_token = 3;
  618. }
  619. // Response message for ListFirebaseLinks RPC
  620. message ListFirebaseLinksResponse {
  621. // List of FirebaseLinks. This will have at most one value.
  622. repeated FirebaseLink firebase_links = 1;
  623. // A token, which can be sent as `page_token` to retrieve the next page.
  624. // If this field is omitted, there are no subsequent pages.
  625. // Currently, Google Analytics supports only one FirebaseLink per property,
  626. // so this will never be populated.
  627. string next_page_token = 2;
  628. }
  629. // Request message for CreateGoogleAdsLink RPC
  630. message CreateGoogleAdsLinkRequest {
  631. // Required. Example format: properties/1234
  632. string parent = 1 [
  633. (google.api.field_behavior) = REQUIRED,
  634. (google.api.resource_reference) = {
  635. child_type: "analyticsadmin.googleapis.com/GoogleAdsLink"
  636. }
  637. ];
  638. // Required. The GoogleAdsLink to create.
  639. GoogleAdsLink google_ads_link = 2 [(google.api.field_behavior) = REQUIRED];
  640. }
  641. // Request message for UpdateGoogleAdsLink RPC
  642. message UpdateGoogleAdsLinkRequest {
  643. // The GoogleAdsLink to update
  644. GoogleAdsLink google_ads_link = 1;
  645. // Required. The list of fields to be updated. Field names must be in snake case
  646. // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
  647. // the entire entity, use one path with the string "*" to match all fields.
  648. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  649. }
  650. // Request message for DeleteGoogleAdsLink RPC.
  651. message DeleteGoogleAdsLinkRequest {
  652. // Required. Example format: properties/1234/googleAdsLinks/5678
  653. string name = 1 [
  654. (google.api.field_behavior) = REQUIRED,
  655. (google.api.resource_reference) = {
  656. type: "analyticsadmin.googleapis.com/GoogleAdsLink"
  657. }
  658. ];
  659. }
  660. // Request message for ListGoogleAdsLinks RPC.
  661. message ListGoogleAdsLinksRequest {
  662. // Required. Example format: properties/1234
  663. string parent = 1 [
  664. (google.api.field_behavior) = REQUIRED,
  665. (google.api.resource_reference) = {
  666. child_type: "analyticsadmin.googleapis.com/GoogleAdsLink"
  667. }
  668. ];
  669. // The maximum number of resources to return.
  670. // If unspecified, at most 50 resources will be returned.
  671. // The maximum value is 200 (higher values will be coerced to the maximum).
  672. int32 page_size = 2;
  673. // A page token, received from a previous `ListGoogleAdsLinks` call.
  674. // Provide this to retrieve the subsequent page.
  675. //
  676. // When paginating, all other parameters provided to `ListGoogleAdsLinks` must
  677. // match the call that provided the page token.
  678. string page_token = 3;
  679. }
  680. // Response message for ListGoogleAdsLinks RPC.
  681. message ListGoogleAdsLinksResponse {
  682. // List of GoogleAdsLinks.
  683. repeated GoogleAdsLink google_ads_links = 1;
  684. // A token, which can be sent as `page_token` to retrieve the next page.
  685. // If this field is omitted, there are no subsequent pages.
  686. string next_page_token = 2;
  687. }
  688. // Request message for GetDataSharingSettings RPC.
  689. message GetDataSharingSettingsRequest {
  690. // Required. The name of the settings to lookup.
  691. // Format: accounts/{account}/dataSharingSettings
  692. // Example: "accounts/1000/dataSharingSettings"
  693. string name = 1 [
  694. (google.api.field_behavior) = REQUIRED,
  695. (google.api.resource_reference) = {
  696. type: "analyticsadmin.googleapis.com/DataSharingSettings"
  697. }
  698. ];
  699. }
  700. // Request message for ListAccountSummaries RPC.
  701. message ListAccountSummariesRequest {
  702. // The maximum number of AccountSummary resources to return. The service may
  703. // return fewer than this value, even if there are additional pages.
  704. // If unspecified, at most 50 resources will be returned.
  705. // The maximum value is 200; (higher values will be coerced to the maximum)
  706. int32 page_size = 1;
  707. // A page token, received from a previous `ListAccountSummaries` call.
  708. // Provide this to retrieve the subsequent page.
  709. // When paginating, all other parameters provided to `ListAccountSummaries`
  710. // must match the call that provided the page token.
  711. string page_token = 2;
  712. }
  713. // Response message for ListAccountSummaries RPC.
  714. message ListAccountSummariesResponse {
  715. // Account summaries of all accounts the caller has access to.
  716. repeated AccountSummary account_summaries = 1;
  717. // A token, which can be sent as `page_token` to retrieve the next page.
  718. // If this field is omitted, there are no subsequent pages.
  719. string next_page_token = 2;
  720. }
  721. // Request message for AcknowledgeUserDataCollection RPC.
  722. message AcknowledgeUserDataCollectionRequest {
  723. // Required. The property for which to acknowledge user data collection.
  724. string property = 1 [
  725. (google.api.field_behavior) = REQUIRED,
  726. (google.api.resource_reference) = {
  727. type: "analyticsadmin.googleapis.com/Property"
  728. }
  729. ];
  730. // Required. An acknowledgement that the caller of this method understands the terms
  731. // of user data collection.
  732. //
  733. // This field must contain the exact value:
  734. // "I acknowledge that I have the necessary privacy disclosures and rights
  735. // from my end users for the collection and processing of their data,
  736. // including the association of such data with the visitation information
  737. // Google Analytics collects from my site and/or app property."
  738. string acknowledgement = 2 [(google.api.field_behavior) = REQUIRED];
  739. }
  740. // Response message for AcknowledgeUserDataCollection RPC.
  741. message AcknowledgeUserDataCollectionResponse {
  742. }
  743. // Request message for SearchChangeHistoryEvents RPC.
  744. message SearchChangeHistoryEventsRequest {
  745. // Required. The account resource for which to return change history resources.
  746. string account = 1 [
  747. (google.api.field_behavior) = REQUIRED,
  748. (google.api.resource_reference) = {
  749. type: "analyticsadmin.googleapis.com/Account"
  750. }
  751. ];
  752. // Optional. Resource name for a child property. If set, only return changes
  753. // made to this property or its child resources.
  754. string property = 2 [
  755. (google.api.field_behavior) = OPTIONAL,
  756. (google.api.resource_reference) = {
  757. type: "analyticsadmin.googleapis.com/Property"
  758. }
  759. ];
  760. // Optional. If set, only return changes if they are for a resource that matches at
  761. // least one of these types.
  762. repeated ChangeHistoryResourceType resource_type = 3 [(google.api.field_behavior) = OPTIONAL];
  763. // Optional. If set, only return changes that match one or more of these types of
  764. // actions.
  765. repeated ActionType action = 4 [(google.api.field_behavior) = OPTIONAL];
  766. // Optional. If set, only return changes if they are made by a user in this list.
  767. repeated string actor_email = 5 [(google.api.field_behavior) = OPTIONAL];
  768. // Optional. If set, only return changes made after this time (inclusive).
  769. google.protobuf.Timestamp earliest_change_time = 6 [(google.api.field_behavior) = OPTIONAL];
  770. // Optional. If set, only return changes made before this time (inclusive).
  771. google.protobuf.Timestamp latest_change_time = 7 [(google.api.field_behavior) = OPTIONAL];
  772. // Optional. The maximum number of ChangeHistoryEvent items to return.
  773. // The service may return fewer than this value, even if there are additional
  774. // pages. If unspecified, at most 50 items will be returned.
  775. // The maximum value is 200 (higher values will be coerced to the maximum).
  776. int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL];
  777. // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call.
  778. // Provide this to retrieve the subsequent page. When paginating, all other
  779. // parameters provided to `SearchChangeHistoryEvents` must match the call that
  780. // provided the page token.
  781. string page_token = 9 [(google.api.field_behavior) = OPTIONAL];
  782. }
  783. // Response message for SearchAccounts RPC.
  784. message SearchChangeHistoryEventsResponse {
  785. // Results that were accessible to the caller.
  786. repeated ChangeHistoryEvent change_history_events = 1;
  787. // A token, which can be sent as `page_token` to retrieve the next page.
  788. // If this field is omitted, there are no subsequent pages.
  789. string next_page_token = 2;
  790. }
  791. // Request message for GetMeasurementProtocolSecret RPC.
  792. message GetMeasurementProtocolSecretRequest {
  793. // Required. The name of the measurement protocol secret to lookup.
  794. // Format:
  795. // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
  796. string name = 1 [
  797. (google.api.field_behavior) = REQUIRED,
  798. (google.api.resource_reference) = {
  799. type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
  800. }
  801. ];
  802. }
  803. // Request message for CreateMeasurementProtocolSecret RPC
  804. message CreateMeasurementProtocolSecretRequest {
  805. // Required. The parent resource where this secret will be created.
  806. // Format: properties/{property}/dataStreams/{dataStream}
  807. string parent = 1 [
  808. (google.api.field_behavior) = REQUIRED,
  809. (google.api.resource_reference) = {
  810. child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
  811. }
  812. ];
  813. // Required. The measurement protocol secret to create.
  814. MeasurementProtocolSecret measurement_protocol_secret = 2 [(google.api.field_behavior) = REQUIRED];
  815. }
  816. // Request message for DeleteMeasurementProtocolSecret RPC
  817. message DeleteMeasurementProtocolSecretRequest {
  818. // Required. The name of the MeasurementProtocolSecret to delete.
  819. // Format:
  820. // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}
  821. string name = 1 [
  822. (google.api.field_behavior) = REQUIRED,
  823. (google.api.resource_reference) = {
  824. type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
  825. }
  826. ];
  827. }
  828. // Request message for UpdateMeasurementProtocolSecret RPC
  829. message UpdateMeasurementProtocolSecretRequest {
  830. // Required. The measurement protocol secret to update.
  831. MeasurementProtocolSecret measurement_protocol_secret = 1 [(google.api.field_behavior) = REQUIRED];
  832. // The list of fields to be updated. Omitted fields will not be updated.
  833. google.protobuf.FieldMask update_mask = 2;
  834. }
  835. // Request message for ListMeasurementProtocolSecret RPC
  836. message ListMeasurementProtocolSecretsRequest {
  837. // Required. The resource name of the parent stream.
  838. // Format:
  839. // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets
  840. string parent = 1 [
  841. (google.api.field_behavior) = REQUIRED,
  842. (google.api.resource_reference) = {
  843. child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret"
  844. }
  845. ];
  846. // The maximum number of resources to return.
  847. // If unspecified, at most 10 resources will be returned.
  848. // The maximum value is 10. Higher values will be coerced to the maximum.
  849. int32 page_size = 2;
  850. // A page token, received from a previous `ListMeasurementProtocolSecrets`
  851. // call. Provide this to retrieve the subsequent page. When paginating, all
  852. // other parameters provided to `ListMeasurementProtocolSecrets` must match
  853. // the call that provided the page token.
  854. string page_token = 3;
  855. }
  856. // Response message for ListMeasurementProtocolSecret RPC
  857. message ListMeasurementProtocolSecretsResponse {
  858. // A list of secrets for the parent stream specified in the request.
  859. repeated MeasurementProtocolSecret measurement_protocol_secrets = 1;
  860. // A token, which can be sent as `page_token` to retrieve the next page.
  861. // If this field is omitted, there are no subsequent pages.
  862. string next_page_token = 2;
  863. }
  864. // Request message for CreateConversionEvent RPC
  865. message CreateConversionEventRequest {
  866. // Required. The conversion event to create.
  867. ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED];
  868. // Required. The resource name of the parent property where this conversion event will
  869. // be created. Format: properties/123
  870. string parent = 2 [
  871. (google.api.field_behavior) = REQUIRED,
  872. (google.api.resource_reference) = {
  873. child_type: "analyticsadmin.googleapis.com/ConversionEvent"
  874. }
  875. ];
  876. }
  877. // Request message for GetConversionEvent RPC
  878. message GetConversionEventRequest {
  879. // Required. The resource name of the conversion event to retrieve.
  880. // Format: properties/{property}/conversionEvents/{conversion_event}
  881. // Example: "properties/123/conversionEvents/456"
  882. string name = 1 [
  883. (google.api.field_behavior) = REQUIRED,
  884. (google.api.resource_reference) = {
  885. type: "analyticsadmin.googleapis.com/ConversionEvent"
  886. }
  887. ];
  888. }
  889. // Request message for DeleteConversionEvent RPC
  890. message DeleteConversionEventRequest {
  891. // Required. The resource name of the conversion event to delete.
  892. // Format: properties/{property}/conversionEvents/{conversion_event}
  893. // Example: "properties/123/conversionEvents/456"
  894. string name = 1 [
  895. (google.api.field_behavior) = REQUIRED,
  896. (google.api.resource_reference) = {
  897. type: "analyticsadmin.googleapis.com/ConversionEvent"
  898. }
  899. ];
  900. }
  901. // Request message for ListConversionEvents RPC
  902. message ListConversionEventsRequest {
  903. // Required. The resource name of the parent property.
  904. // Example: 'properties/123'
  905. string parent = 1 [
  906. (google.api.field_behavior) = REQUIRED,
  907. (google.api.resource_reference) = {
  908. child_type: "analyticsadmin.googleapis.com/ConversionEvent"
  909. }
  910. ];
  911. // The maximum number of resources to return.
  912. // If unspecified, at most 50 resources will be returned.
  913. // The maximum value is 200; (higher values will be coerced to the maximum)
  914. int32 page_size = 2;
  915. // A page token, received from a previous `ListConversionEvents` call.
  916. // Provide this to retrieve the subsequent page.
  917. // When paginating, all other parameters provided to `ListConversionEvents`
  918. // must match the call that provided the page token.
  919. string page_token = 3;
  920. }
  921. // Response message for ListConversionEvents RPC.
  922. message ListConversionEventsResponse {
  923. // The requested conversion events
  924. repeated ConversionEvent conversion_events = 1;
  925. // A token, which can be sent as `page_token` to retrieve the next page.
  926. // If this field is omitted, there are no subsequent pages.
  927. string next_page_token = 2;
  928. }
  929. // Request message for CreateCustomDimension RPC.
  930. message CreateCustomDimensionRequest {
  931. // Required. Example format: properties/1234
  932. string parent = 1 [
  933. (google.api.field_behavior) = REQUIRED,
  934. (google.api.resource_reference) = {
  935. child_type: "analyticsadmin.googleapis.com/CustomDimension"
  936. }
  937. ];
  938. // Required. The CustomDimension to create.
  939. CustomDimension custom_dimension = 2 [(google.api.field_behavior) = REQUIRED];
  940. }
  941. // Request message for UpdateCustomDimension RPC.
  942. message UpdateCustomDimensionRequest {
  943. // The CustomDimension to update
  944. CustomDimension custom_dimension = 1;
  945. // Required. The list of fields to be updated. Omitted fields will not be updated.
  946. // To replace the entire entity, use one path with the string "*" to match
  947. // all fields.
  948. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  949. }
  950. // Request message for ListCustomDimensions RPC.
  951. message ListCustomDimensionsRequest {
  952. // Required. Example format: properties/1234
  953. string parent = 1 [
  954. (google.api.field_behavior) = REQUIRED,
  955. (google.api.resource_reference) = {
  956. child_type: "analyticsadmin.googleapis.com/CustomDimension"
  957. }
  958. ];
  959. // The maximum number of resources to return.
  960. // If unspecified, at most 50 resources will be returned.
  961. // The maximum value is 200 (higher values will be coerced to the maximum).
  962. int32 page_size = 2;
  963. // A page token, received from a previous `ListCustomDimensions` call.
  964. // Provide this to retrieve the subsequent page.
  965. //
  966. // When paginating, all other parameters provided to `ListCustomDimensions`
  967. // must match the call that provided the page token.
  968. string page_token = 3;
  969. }
  970. // Response message for ListCustomDimensions RPC.
  971. message ListCustomDimensionsResponse {
  972. // List of CustomDimensions.
  973. repeated CustomDimension custom_dimensions = 1;
  974. // A token, which can be sent as `page_token` to retrieve the next page.
  975. // If this field is omitted, there are no subsequent pages.
  976. string next_page_token = 2;
  977. }
  978. // Request message for ArchiveCustomDimension RPC.
  979. message ArchiveCustomDimensionRequest {
  980. // Required. The name of the CustomDimension to archive.
  981. // Example format: properties/1234/customDimensions/5678
  982. string name = 1 [
  983. (google.api.field_behavior) = REQUIRED,
  984. (google.api.resource_reference) = {
  985. type: "analyticsadmin.googleapis.com/CustomDimension"
  986. }
  987. ];
  988. }
  989. // Request message for GetCustomDimension RPC.
  990. message GetCustomDimensionRequest {
  991. // Required. The name of the CustomDimension to get.
  992. // Example format: properties/1234/customDimensions/5678
  993. string name = 1 [
  994. (google.api.field_behavior) = REQUIRED,
  995. (google.api.resource_reference) = {
  996. type: "analyticsadmin.googleapis.com/CustomDimension"
  997. }
  998. ];
  999. }
  1000. // Request message for CreateCustomMetric RPC.
  1001. message CreateCustomMetricRequest {
  1002. // Required. Example format: properties/1234
  1003. string parent = 1 [
  1004. (google.api.field_behavior) = REQUIRED,
  1005. (google.api.resource_reference) = {
  1006. child_type: "analyticsadmin.googleapis.com/CustomMetric"
  1007. }
  1008. ];
  1009. // Required. The CustomMetric to create.
  1010. CustomMetric custom_metric = 2 [(google.api.field_behavior) = REQUIRED];
  1011. }
  1012. // Request message for UpdateCustomMetric RPC.
  1013. message UpdateCustomMetricRequest {
  1014. // The CustomMetric to update
  1015. CustomMetric custom_metric = 1;
  1016. // Required. The list of fields to be updated. Omitted fields will not be updated.
  1017. // To replace the entire entity, use one path with the string "*" to match
  1018. // all fields.
  1019. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  1020. }
  1021. // Request message for ListCustomMetrics RPC.
  1022. message ListCustomMetricsRequest {
  1023. // Required. Example format: properties/1234
  1024. string parent = 1 [
  1025. (google.api.field_behavior) = REQUIRED,
  1026. (google.api.resource_reference) = {
  1027. child_type: "analyticsadmin.googleapis.com/CustomMetric"
  1028. }
  1029. ];
  1030. // The maximum number of resources to return.
  1031. // If unspecified, at most 50 resources will be returned.
  1032. // The maximum value is 200 (higher values will be coerced to the maximum).
  1033. int32 page_size = 2;
  1034. // A page token, received from a previous `ListCustomMetrics` call.
  1035. // Provide this to retrieve the subsequent page.
  1036. //
  1037. // When paginating, all other parameters provided to `ListCustomMetrics` must
  1038. // match the call that provided the page token.
  1039. string page_token = 3;
  1040. }
  1041. // Response message for ListCustomMetrics RPC.
  1042. message ListCustomMetricsResponse {
  1043. // List of CustomMetrics.
  1044. repeated CustomMetric custom_metrics = 1;
  1045. // A token, which can be sent as `page_token` to retrieve the next page.
  1046. // If this field is omitted, there are no subsequent pages.
  1047. string next_page_token = 2;
  1048. }
  1049. // Request message for ArchiveCustomMetric RPC.
  1050. message ArchiveCustomMetricRequest {
  1051. // Required. The name of the CustomMetric to archive.
  1052. // Example format: properties/1234/customMetrics/5678
  1053. string name = 1 [
  1054. (google.api.field_behavior) = REQUIRED,
  1055. (google.api.resource_reference) = {
  1056. type: "analyticsadmin.googleapis.com/CustomMetric"
  1057. }
  1058. ];
  1059. }
  1060. // Request message for GetCustomMetric RPC.
  1061. message GetCustomMetricRequest {
  1062. // Required. The name of the CustomMetric to get.
  1063. // Example format: properties/1234/customMetrics/5678
  1064. string name = 1 [
  1065. (google.api.field_behavior) = REQUIRED,
  1066. (google.api.resource_reference) = {
  1067. type: "analyticsadmin.googleapis.com/CustomMetric"
  1068. }
  1069. ];
  1070. }
  1071. // Request message for GetDataRetentionSettings RPC.
  1072. message GetDataRetentionSettingsRequest {
  1073. // Required. The name of the settings to lookup.
  1074. // Format:
  1075. // properties/{property}/dataRetentionSettings
  1076. // Example: "properties/1000/dataRetentionSettings"
  1077. string name = 1 [
  1078. (google.api.field_behavior) = REQUIRED,
  1079. (google.api.resource_reference) = {
  1080. type: "analyticsadmin.googleapis.com/DataRetentionSettings"
  1081. }
  1082. ];
  1083. }
  1084. // Request message for UpdateDataRetentionSettings RPC.
  1085. message UpdateDataRetentionSettingsRequest {
  1086. // Required. The settings to update.
  1087. // The `name` field is used to identify the settings to be updated.
  1088. DataRetentionSettings data_retention_settings = 1 [(google.api.field_behavior) = REQUIRED];
  1089. // Required. The list of fields to be updated. Field names must be in snake case
  1090. // (e.g., "field_to_update"). Omitted fields will not be updated. To replace
  1091. // the entire entity, use one path with the string "*" to match all fields.
  1092. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  1093. }
  1094. // Request message for CreateDataStream RPC.
  1095. message CreateDataStreamRequest {
  1096. // Required. Example format: properties/1234
  1097. string parent = 1 [
  1098. (google.api.field_behavior) = REQUIRED,
  1099. (google.api.resource_reference) = {
  1100. child_type: "analyticsadmin.googleapis.com/DataStream"
  1101. }
  1102. ];
  1103. // Required. The DataStream to create.
  1104. DataStream data_stream = 2 [(google.api.field_behavior) = REQUIRED];
  1105. }
  1106. // Request message for DeleteDataStream RPC.
  1107. message DeleteDataStreamRequest {
  1108. // Required. The name of the DataStream to delete.
  1109. // Example format: properties/1234/dataStreams/5678
  1110. string name = 1 [
  1111. (google.api.field_behavior) = REQUIRED,
  1112. (google.api.resource_reference) = {
  1113. type: "analyticsadmin.googleapis.com/DataStream"
  1114. }
  1115. ];
  1116. }
  1117. // Request message for UpdateDataStream RPC.
  1118. message UpdateDataStreamRequest {
  1119. // The DataStream to update
  1120. DataStream data_stream = 1;
  1121. // Required. The list of fields to be updated. Omitted fields will not be updated.
  1122. // To replace the entire entity, use one path with the string "*" to match
  1123. // all fields.
  1124. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  1125. }
  1126. // Request message for ListDataStreams RPC.
  1127. message ListDataStreamsRequest {
  1128. // Required. Example format: properties/1234
  1129. string parent = 1 [
  1130. (google.api.field_behavior) = REQUIRED,
  1131. (google.api.resource_reference) = {
  1132. child_type: "analyticsadmin.googleapis.com/DataStream"
  1133. }
  1134. ];
  1135. // The maximum number of resources to return.
  1136. // If unspecified, at most 50 resources will be returned.
  1137. // The maximum value is 200 (higher values will be coerced to the maximum).
  1138. int32 page_size = 2;
  1139. // A page token, received from a previous `ListDataStreams` call.
  1140. // Provide this to retrieve the subsequent page.
  1141. //
  1142. // When paginating, all other parameters provided to `ListDataStreams` must
  1143. // match the call that provided the page token.
  1144. string page_token = 3;
  1145. }
  1146. // Response message for ListDataStreams RPC.
  1147. message ListDataStreamsResponse {
  1148. // List of DataStreams.
  1149. repeated DataStream data_streams = 1;
  1150. // A token, which can be sent as `page_token` to retrieve the next page.
  1151. // If this field is omitted, there are no subsequent pages.
  1152. string next_page_token = 2;
  1153. }
  1154. // Request message for GetDataStream RPC.
  1155. message GetDataStreamRequest {
  1156. // Required. The name of the DataStream to get.
  1157. // Example format: properties/1234/dataStreams/5678
  1158. string name = 1 [
  1159. (google.api.field_behavior) = REQUIRED,
  1160. (google.api.resource_reference) = {
  1161. type: "analyticsadmin.googleapis.com/DataStream"
  1162. }
  1163. ];
  1164. }