google_dfareporting3/lib.rs
1// DO NOT EDIT !
2// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
3// DO NOT EDIT !
4
5//! This documentation was generated from *dfareporting* crate version *7.0.0+20180830*, where *20180830* is the exact revision of the *dfareporting:v3.0* schema built by the [mako](http://www.makotemplates.org/) code generator *v7.0.0*.
6//!
7//! Everything else about the *dfareporting* *v3* API can be found at the
8//! [official documentation site](https://developers.google.com/doubleclick-advertisers/).
9//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/dfareporting3).
10//! # Features
11//!
12//! Handle the following *Resources* with ease from the central [hub](Dfareporting) ...
13//!
14//! * [account active ad summaries](api::AccountActiveAdSummary)
15//! * [*get*](api::AccountActiveAdSummaryGetCall)
16//! * [account permission groups](api::AccountPermissionGroup)
17//! * [*get*](api::AccountPermissionGroupGetCall) and [*list*](api::AccountPermissionGroupListCall)
18//! * [account permissions](api::AccountPermission)
19//! * [*get*](api::AccountPermissionGetCall) and [*list*](api::AccountPermissionListCall)
20//! * [account user profiles](api::AccountUserProfile)
21//! * [*get*](api::AccountUserProfileGetCall), [*insert*](api::AccountUserProfileInsertCall), [*list*](api::AccountUserProfileListCall), [*patch*](api::AccountUserProfilePatchCall) and [*update*](api::AccountUserProfileUpdateCall)
22//! * [accounts](api::Account)
23//! * [*get*](api::AccountGetCall), [*list*](api::AccountListCall), [*patch*](api::AccountPatchCall) and [*update*](api::AccountUpdateCall)
24//! * [ads](api::Ad)
25//! * [*get*](api::AdGetCall), [*insert*](api::AdInsertCall), [*list*](api::AdListCall), [*patch*](api::AdPatchCall) and [*update*](api::AdUpdateCall)
26//! * [advertiser groups](api::AdvertiserGroup)
27//! * [*delete*](api::AdvertiserGroupDeleteCall), [*get*](api::AdvertiserGroupGetCall), [*insert*](api::AdvertiserGroupInsertCall), [*list*](api::AdvertiserGroupListCall), [*patch*](api::AdvertiserGroupPatchCall) and [*update*](api::AdvertiserGroupUpdateCall)
28//! * advertiser landing pages
29//! * [*get*](api::AdvertiserLandingPageGetCall), [*insert*](api::AdvertiserLandingPageInsertCall), [*list*](api::AdvertiserLandingPageListCall), [*patch*](api::AdvertiserLandingPagePatchCall) and [*update*](api::AdvertiserLandingPageUpdateCall)
30//! * [advertisers](api::Advertiser)
31//! * [*get*](api::AdvertiserGetCall), [*insert*](api::AdvertiserInsertCall), [*list*](api::AdvertiserListCall), [*patch*](api::AdvertiserPatchCall) and [*update*](api::AdvertiserUpdateCall)
32//! * [browsers](api::Browser)
33//! * [*list*](api::BrowserListCall)
34//! * [campaign creative associations](api::CampaignCreativeAssociation)
35//! * [*insert*](api::CampaignCreativeAssociationInsertCall) and [*list*](api::CampaignCreativeAssociationListCall)
36//! * [campaigns](api::Campaign)
37//! * [*get*](api::CampaignGetCall), [*insert*](api::CampaignInsertCall), [*list*](api::CampaignListCall), [*patch*](api::CampaignPatchCall) and [*update*](api::CampaignUpdateCall)
38//! * [change logs](api::ChangeLog)
39//! * [*get*](api::ChangeLogGetCall) and [*list*](api::ChangeLogListCall)
40//! * [cities](api::City)
41//! * [*list*](api::CityListCall)
42//! * [connection types](api::ConnectionType)
43//! * [*get*](api::ConnectionTypeGetCall) and [*list*](api::ConnectionTypeListCall)
44//! * [content categories](api::ContentCategory)
45//! * [*delete*](api::ContentCategoryDeleteCall), [*get*](api::ContentCategoryGetCall), [*insert*](api::ContentCategoryInsertCall), [*list*](api::ContentCategoryListCall), [*patch*](api::ContentCategoryPatchCall) and [*update*](api::ContentCategoryUpdateCall)
46//! * [conversions](api::Conversion)
47//! * [*batchinsert*](api::ConversionBatchinsertCall) and [*batchupdate*](api::ConversionBatchupdateCall)
48//! * [countries](api::Country)
49//! * [*get*](api::CountryGetCall) and [*list*](api::CountryListCall)
50//! * [creative assets](api::CreativeAsset)
51//! * [*insert*](api::CreativeAssetInsertCall)
52//! * [creative field values](api::CreativeFieldValue)
53//! * [*delete*](api::CreativeFieldValueDeleteCall), [*get*](api::CreativeFieldValueGetCall), [*insert*](api::CreativeFieldValueInsertCall), [*list*](api::CreativeFieldValueListCall), [*patch*](api::CreativeFieldValuePatchCall) and [*update*](api::CreativeFieldValueUpdateCall)
54//! * [creative fields](api::CreativeField)
55//! * [*delete*](api::CreativeFieldDeleteCall), [*get*](api::CreativeFieldGetCall), [*insert*](api::CreativeFieldInsertCall), [*list*](api::CreativeFieldListCall), [*patch*](api::CreativeFieldPatchCall) and [*update*](api::CreativeFieldUpdateCall)
56//! * [creative groups](api::CreativeGroup)
57//! * [*get*](api::CreativeGroupGetCall), [*insert*](api::CreativeGroupInsertCall), [*list*](api::CreativeGroupListCall), [*patch*](api::CreativeGroupPatchCall) and [*update*](api::CreativeGroupUpdateCall)
58//! * [creatives](api::Creative)
59//! * [*get*](api::CreativeGetCall), [*insert*](api::CreativeInsertCall), [*list*](api::CreativeListCall), [*patch*](api::CreativePatchCall) and [*update*](api::CreativeUpdateCall)
60//! * [dimension values](api::DimensionValue)
61//! * [*query*](api::DimensionValueQueryCall)
62//! * [directory site contacts](api::DirectorySiteContact)
63//! * [*get*](api::DirectorySiteContactGetCall) and [*list*](api::DirectorySiteContactListCall)
64//! * [directory sites](api::DirectorySite)
65//! * [*get*](api::DirectorySiteGetCall), [*insert*](api::DirectorySiteInsertCall) and [*list*](api::DirectorySiteListCall)
66//! * [dynamic targeting keys](api::DynamicTargetingKey)
67//! * [*delete*](api::DynamicTargetingKeyDeleteCall), [*insert*](api::DynamicTargetingKeyInsertCall) and [*list*](api::DynamicTargetingKeyListCall)
68//! * [event tags](api::EventTag)
69//! * [*delete*](api::EventTagDeleteCall), [*get*](api::EventTagGetCall), [*insert*](api::EventTagInsertCall), [*list*](api::EventTagListCall), [*patch*](api::EventTagPatchCall) and [*update*](api::EventTagUpdateCall)
70//! * [files](api::File)
71//! * [*get*](api::FileGetCall) and [*list*](api::FileListCall)
72//! * [floodlight activities](api::FloodlightActivity)
73//! * [*delete*](api::FloodlightActivityDeleteCall), [*generatetag*](api::FloodlightActivityGeneratetagCall), [*get*](api::FloodlightActivityGetCall), [*insert*](api::FloodlightActivityInsertCall), [*list*](api::FloodlightActivityListCall), [*patch*](api::FloodlightActivityPatchCall) and [*update*](api::FloodlightActivityUpdateCall)
74//! * [floodlight activity groups](api::FloodlightActivityGroup)
75//! * [*get*](api::FloodlightActivityGroupGetCall), [*insert*](api::FloodlightActivityGroupInsertCall), [*list*](api::FloodlightActivityGroupListCall), [*patch*](api::FloodlightActivityGroupPatchCall) and [*update*](api::FloodlightActivityGroupUpdateCall)
76//! * [floodlight configurations](api::FloodlightConfiguration)
77//! * [*get*](api::FloodlightConfigurationGetCall), [*list*](api::FloodlightConfigurationListCall), [*patch*](api::FloodlightConfigurationPatchCall) and [*update*](api::FloodlightConfigurationUpdateCall)
78//! * [inventory items](api::InventoryItem)
79//! * [*get*](api::InventoryItemGetCall) and [*list*](api::InventoryItemListCall)
80//! * [languages](api::Language)
81//! * [*list*](api::LanguageListCall)
82//! * [metros](api::Metro)
83//! * [*list*](api::MetroListCall)
84//! * [mobile carriers](api::MobileCarrier)
85//! * [*get*](api::MobileCarrierGetCall) and [*list*](api::MobileCarrierListCall)
86//! * [operating system versions](api::OperatingSystemVersion)
87//! * [*get*](api::OperatingSystemVersionGetCall) and [*list*](api::OperatingSystemVersionListCall)
88//! * [operating systems](api::OperatingSystem)
89//! * [*get*](api::OperatingSystemGetCall) and [*list*](api::OperatingSystemListCall)
90//! * [order documents](api::OrderDocument)
91//! * [*get*](api::OrderDocumentGetCall) and [*list*](api::OrderDocumentListCall)
92//! * [orders](api::Order)
93//! * [*get*](api::OrderGetCall) and [*list*](api::OrderListCall)
94//! * [placement groups](api::PlacementGroup)
95//! * [*get*](api::PlacementGroupGetCall), [*insert*](api::PlacementGroupInsertCall), [*list*](api::PlacementGroupListCall), [*patch*](api::PlacementGroupPatchCall) and [*update*](api::PlacementGroupUpdateCall)
96//! * [placement strategies](api::PlacementStrategy)
97//! * [*delete*](api::PlacementStrategyDeleteCall), [*get*](api::PlacementStrategyGetCall), [*insert*](api::PlacementStrategyInsertCall), [*list*](api::PlacementStrategyListCall), [*patch*](api::PlacementStrategyPatchCall) and [*update*](api::PlacementStrategyUpdateCall)
98//! * [placements](api::Placement)
99//! * [*generatetags*](api::PlacementGeneratetagCall), [*get*](api::PlacementGetCall), [*insert*](api::PlacementInsertCall), [*list*](api::PlacementListCall), [*patch*](api::PlacementPatchCall) and [*update*](api::PlacementUpdateCall)
100//! * [platform types](api::PlatformType)
101//! * [*get*](api::PlatformTypeGetCall) and [*list*](api::PlatformTypeListCall)
102//! * [postal codes](api::PostalCode)
103//! * [*get*](api::PostalCodeGetCall) and [*list*](api::PostalCodeListCall)
104//! * [projects](api::Project)
105//! * [*get*](api::ProjectGetCall) and [*list*](api::ProjectListCall)
106//! * [regions](api::Region)
107//! * [*list*](api::RegionListCall)
108//! * [remarketing list shares](api::RemarketingListShare)
109//! * [*get*](api::RemarketingListShareGetCall), [*patch*](api::RemarketingListSharePatchCall) and [*update*](api::RemarketingListShareUpdateCall)
110//! * [remarketing lists](api::RemarketingList)
111//! * [*get*](api::RemarketingListGetCall), [*insert*](api::RemarketingListInsertCall), [*list*](api::RemarketingListListCall), [*patch*](api::RemarketingListPatchCall) and [*update*](api::RemarketingListUpdateCall)
112//! * [reports](api::Report)
113//! * [*compatible fields query*](api::ReportCompatibleFieldQueryCall), [*delete*](api::ReportDeleteCall), [*files get*](api::ReportFileGetCall), [*files list*](api::ReportFileListCall), [*get*](api::ReportGetCall), [*insert*](api::ReportInsertCall), [*list*](api::ReportListCall), [*patch*](api::ReportPatchCall), [*run*](api::ReportRunCall) and [*update*](api::ReportUpdateCall)
114//! * [sites](api::Site)
115//! * [*get*](api::SiteGetCall), [*insert*](api::SiteInsertCall), [*list*](api::SiteListCall), [*patch*](api::SitePatchCall) and [*update*](api::SiteUpdateCall)
116//! * [sizes](api::Size)
117//! * [*get*](api::SizeGetCall), [*insert*](api::SizeInsertCall) and [*list*](api::SizeListCall)
118//! * [subaccounts](api::Subaccount)
119//! * [*get*](api::SubaccountGetCall), [*insert*](api::SubaccountInsertCall), [*list*](api::SubaccountListCall), [*patch*](api::SubaccountPatchCall) and [*update*](api::SubaccountUpdateCall)
120//! * [targetable remarketing lists](api::TargetableRemarketingList)
121//! * [*get*](api::TargetableRemarketingListGetCall) and [*list*](api::TargetableRemarketingListListCall)
122//! * [targeting templates](api::TargetingTemplate)
123//! * [*get*](api::TargetingTemplateGetCall), [*insert*](api::TargetingTemplateInsertCall), [*list*](api::TargetingTemplateListCall), [*patch*](api::TargetingTemplatePatchCall) and [*update*](api::TargetingTemplateUpdateCall)
124//! * [user profiles](api::UserProfile)
125//! * [*get*](api::UserProfileGetCall) and [*list*](api::UserProfileListCall)
126//! * [user role permission groups](api::UserRolePermissionGroup)
127//! * [*get*](api::UserRolePermissionGroupGetCall) and [*list*](api::UserRolePermissionGroupListCall)
128//! * [user role permissions](api::UserRolePermission)
129//! * [*get*](api::UserRolePermissionGetCall) and [*list*](api::UserRolePermissionListCall)
130//! * [user roles](api::UserRole)
131//! * [*delete*](api::UserRoleDeleteCall), [*get*](api::UserRoleGetCall), [*insert*](api::UserRoleInsertCall), [*list*](api::UserRoleListCall), [*patch*](api::UserRolePatchCall) and [*update*](api::UserRoleUpdateCall)
132//! * [video formats](api::VideoFormat)
133//! * [*get*](api::VideoFormatGetCall) and [*list*](api::VideoFormatListCall)
134//!
135//!
136//! Upload supported by ...
137//!
138//! * [*insert creative assets*](api::CreativeAssetInsertCall)
139//!
140//! Download supported by ...
141//!
142//! * [*get files*](api::FileGetCall)
143//! * [*files get reports*](api::ReportFileGetCall)
144//!
145//!
146//!
147//! Not what you are looking for ? Find all other Google APIs in their Rust [documentation index](http://byron.github.io/google-apis-rs).
148//!
149//! # Structure of this Library
150//!
151//! The API is structured into the following primary items:
152//!
153//! * **[Hub](Dfareporting)**
154//! * a central object to maintain state and allow accessing all *Activities*
155//! * creates [*Method Builders*](common::MethodsBuilder) which in turn
156//! allow access to individual [*Call Builders*](common::CallBuilder)
157//! * **[Resources](common::Resource)**
158//! * primary types that you can apply *Activities* to
159//! * a collection of properties and *Parts*
160//! * **[Parts](common::Part)**
161//! * a collection of properties
162//! * never directly used in *Activities*
163//! * **[Activities](common::CallBuilder)**
164//! * operations to apply to *Resources*
165//!
166//! All *structures* are marked with applicable traits to further categorize them and ease browsing.
167//!
168//! Generally speaking, you can invoke *Activities* like this:
169//!
170//! ```Rust,ignore
171//! let r = hub.resource().activity(...).doit().await
172//! ```
173//!
174//! Or specifically ...
175//!
176//! ```ignore
177//! let r = hub.reports().compatible_fields_query(...).doit().await
178//! let r = hub.reports().files_get(...).doit().await
179//! let r = hub.reports().files_list(...).doit().await
180//! let r = hub.reports().delete(...).doit().await
181//! let r = hub.reports().get(...).doit().await
182//! let r = hub.reports().insert(...).doit().await
183//! let r = hub.reports().list(...).doit().await
184//! let r = hub.reports().patch(...).doit().await
185//! let r = hub.reports().run(...).doit().await
186//! let r = hub.reports().update(...).doit().await
187//! ```
188//!
189//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
190//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
191//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
192//! The `doit()` method performs the actual communication with the server and returns the respective result.
193//!
194//! # Usage
195//!
196//! ## Setting up your Project
197//!
198//! To use this library, you would put the following lines into your `Cargo.toml` file:
199//!
200//! ```toml
201//! [dependencies]
202//! google-dfareporting3 = "*"
203//! serde = "1"
204//! serde_json = "1"
205//! ```
206//!
207//! ## A complete example
208//!
209//! ```test_harness,no_run
210//! extern crate hyper;
211//! extern crate hyper_rustls;
212//! extern crate google_dfareporting3 as dfareporting3;
213//! use dfareporting3::{Result, Error};
214//! # async fn dox() {
215//! use dfareporting3::{Dfareporting, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
216//!
217//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
218//! // `client_secret`, among other things.
219//! let secret: yup_oauth2::ApplicationSecret = Default::default();
220//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
221//! // unless you replace `None` with the desired Flow.
222//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
223//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
224//! // retrieve them from storage.
225//! let connector = hyper_rustls::HttpsConnectorBuilder::new()
226//! .with_native_roots()
227//! .unwrap()
228//! .https_only()
229//! .enable_http2()
230//! .build();
231//!
232//! let executor = hyper_util::rt::TokioExecutor::new();
233//! let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
234//! secret,
235//! yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
236//! yup_oauth2::client::CustomHyperClientBuilder::from(
237//! hyper_util::client::legacy::Client::builder(executor).build(connector),
238//! ),
239//! ).build().await.unwrap();
240//!
241//! let client = hyper_util::client::legacy::Client::builder(
242//! hyper_util::rt::TokioExecutor::new()
243//! )
244//! .build(
245//! hyper_rustls::HttpsConnectorBuilder::new()
246//! .with_native_roots()
247//! .unwrap()
248//! .https_or_http()
249//! .enable_http2()
250//! .build()
251//! );
252//! let mut hub = Dfareporting::new(client, auth);
253//! // You can configure optional parameters by calling the respective setters at will, and
254//! // execute the final call using `doit()`.
255//! // Values shown here are possibly random and not representative !
256//! let result = hub.reports().files_list(-8, -80)
257//! .sort_order("amet.")
258//! .sort_field("takimata")
259//! .page_token("amet.")
260//! .max_results(-20)
261//! .doit().await;
262//!
263//! match result {
264//! Err(e) => match e {
265//! // The Error enum provides details about what exactly happened.
266//! // You can also just use its `Debug`, `Display` or `Error` traits
267//! Error::HttpError(_)
268//! |Error::Io(_)
269//! |Error::MissingAPIKey
270//! |Error::MissingToken(_)
271//! |Error::Cancelled
272//! |Error::UploadSizeLimitExceeded(_, _)
273//! |Error::Failure(_)
274//! |Error::BadRequest(_)
275//! |Error::FieldClash(_)
276//! |Error::JsonDecodeError(_, _) => println!("{}", e),
277//! },
278//! Ok(res) => println!("Success: {:?}", res),
279//! }
280//! # }
281//! ```
282//! ## Handling Errors
283//!
284//! All errors produced by the system are provided either as [Result](common::Result) enumeration as return value of
285//! the doit() methods, or handed as possibly intermediate results to either the
286//! [Hub Delegate](common::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
287//!
288//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
289//! makes the system potentially resilient to all kinds of errors.
290//!
291//! ## Uploads and Downloads
292//! If a method supports downloads, the response body, which is part of the [Result](common::Result), should be
293//! read by you to obtain the media.
294//! If such a method also supports a [Response Result](common::ResponseResult), it will return that by default.
295//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
296//! this call: `.param("alt", "media")`.
297//!
298//! Methods supporting uploads can do so using up to 2 different protocols:
299//! *simple* and *resumable*. The distinctiveness of each is represented by customized
300//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
301//!
302//! ## Customization and Callbacks
303//!
304//! You may alter the way an `doit()` method is called by providing a [delegate](common::Delegate) to the
305//! [Method Builder](common::CallBuilder) before making the final `doit()` call.
306//! Respective methods will be called to provide progress information, as well as determine whether the system should
307//! retry on failure.
308//!
309//! The [delegate trait](common::Delegate) is default-implemented, allowing you to customize it with minimal effort.
310//!
311//! ## Optional Parts in Server-Requests
312//!
313//! All structures provided by this library are made to be [encodable](common::RequestValue) and
314//! [decodable](common::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
315//! are valid.
316//! Most optionals are are considered [Parts](common::Part) which are identifiable by name, which will be sent to
317//! the server to indicate either the set parts of the request or the desired parts in the response.
318//!
319//! ## Builder Arguments
320//!
321//! Using [method builders](common::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
322//! These will always take a single argument, for which the following statements are true.
323//!
324//! * [PODs][wiki-pod] are handed by copy
325//! * strings are passed as `&str`
326//! * [request values](common::RequestValue) are moved
327//!
328//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
329//!
330//! [wiki-pod]: http://en.wikipedia.org/wiki/Plain_old_data_structure
331//! [builder-pattern]: http://en.wikipedia.org/wiki/Builder_pattern
332//! [google-go-api]: https://github.com/google/google-api-go-client
333//!
334//! ## Cargo Features
335//!
336//! * `utoipa` - Add support for [utoipa](https://crates.io/crates/utoipa) and derive `utoipa::ToSchema` on all
337//! the types. You'll have to import and register the required types in `#[openapi(schemas(...))]`, otherwise the
338//! generated `openapi` spec would be invalid.
339//!
340//!
341//!
342
343// Unused attributes happen thanks to defined, but unused structures We don't
344// warn about this, as depending on the API, some data structures or facilities
345// are never used. Instead of pre-determining this, we just disable the lint.
346// It's manually tuned to not have any unused imports in fully featured APIs.
347// Same with unused_mut.
348#![allow(unused_imports, unused_mut, dead_code)]
349
350// DO NOT EDIT !
351// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
352// DO NOT EDIT !
353
354pub extern crate hyper;
355pub extern crate hyper_rustls;
356pub extern crate hyper_util;
357#[cfg(feature = "yup-oauth2")]
358pub extern crate yup_oauth2;
359
360pub extern crate google_apis_common as common;
361pub use common::{Delegate, Error, FieldMask, Result};
362
363pub mod api;
364pub use api::Dfareporting;