mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
make regen-apis
This commit is contained in:
File diff suppressed because it is too large
Load Diff
121
gen/adsense2/src/api/hub.rs
Normal file
121
gen/adsense2/src/api/hub.rs
Normal file
@@ -0,0 +1,121 @@
|
||||
use super::*;
|
||||
|
||||
/// Central instance to access all Adsense related resource activities
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Instantiate a new hub
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_adsense2 as adsense2;
|
||||
/// use adsense2::{Result, Error};
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use adsense2::{Adsense, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
|
||||
/// // `client_secret`, among other things.
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
|
||||
/// // unless you replace `None` with the desired Flow.
|
||||
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
|
||||
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
/// // retrieve them from storage.
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = Adsense::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
/// let result = hub.accounts().reports_generate("account")
|
||||
/// .start_date_year(-17)
|
||||
/// .start_date_month(-99)
|
||||
/// .start_date_day(-56)
|
||||
/// .reporting_time_zone("eos")
|
||||
/// .add_order_by("labore")
|
||||
/// .add_metrics("sed")
|
||||
/// .limit(-70)
|
||||
/// .language_code("sed")
|
||||
/// .add_filters("no")
|
||||
/// .end_date_year(-15)
|
||||
/// .end_date_month(-13)
|
||||
/// .end_date_day(-24)
|
||||
/// .add_dimensions("sed")
|
||||
/// .date_range("et")
|
||||
/// .currency_code("et")
|
||||
/// .doit().await;
|
||||
///
|
||||
/// match result {
|
||||
/// Err(e) => match e {
|
||||
/// // The Error enum provides details about what exactly happened.
|
||||
/// // You can also just use its `Debug`, `Display` or `Error` traits
|
||||
/// Error::HttpError(_)
|
||||
/// |Error::Io(_)
|
||||
/// |Error::MissingAPIKey
|
||||
/// |Error::MissingToken(_)
|
||||
/// |Error::Cancelled
|
||||
/// |Error::UploadSizeLimitExceeded(_, _)
|
||||
/// |Error::Failure(_)
|
||||
/// |Error::BadRequest(_)
|
||||
/// |Error::FieldClash(_)
|
||||
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
|
||||
/// },
|
||||
/// Ok(res) => println!("Success: {:?}", res),
|
||||
/// }
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct Adsense<S> {
|
||||
pub client: hyper::Client<S, hyper::body::Body>,
|
||||
pub auth: Box<dyn client::GetToken>,
|
||||
pub(super) _user_agent: String,
|
||||
pub(super) _base_url: String,
|
||||
pub(super) _root_url: String,
|
||||
}
|
||||
|
||||
impl<'a, S> client::Hub for Adsense<S> {}
|
||||
|
||||
impl<'a, S> Adsense<S> {
|
||||
|
||||
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> Adsense<S> {
|
||||
Adsense {
|
||||
client,
|
||||
auth: Box::new(auth),
|
||||
_user_agent: "google-api-rust-client/5.0.3".to_string(),
|
||||
_base_url: "https://adsense.googleapis.com/".to_string(),
|
||||
_root_url: "https://adsense.googleapis.com/".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn accounts(&'a self) -> AccountMethods<'a, S> {
|
||||
AccountMethods { hub: &self }
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/5.0.3`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
mem::replace(&mut self._user_agent, agent_name)
|
||||
}
|
||||
|
||||
/// Set the base url to use in all requests to the server.
|
||||
/// It defaults to `https://adsense.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set base url.
|
||||
pub fn base_url(&mut self, new_base_url: String) -> String {
|
||||
mem::replace(&mut self._base_url, new_base_url)
|
||||
}
|
||||
|
||||
/// Set the root url to use in all requests to the server.
|
||||
/// It defaults to `https://adsense.googleapis.com/`.
|
||||
///
|
||||
/// Returns the previously set root url.
|
||||
pub fn root_url(&mut self, new_root_url: String) -> String {
|
||||
mem::replace(&mut self._root_url, new_root_url)
|
||||
}
|
||||
}
|
||||
645
gen/adsense2/src/api/method_builders.rs
Normal file
645
gen/adsense2/src/api/method_builders.rs
Normal file
@@ -0,0 +1,645 @@
|
||||
use super::*;
|
||||
/// A builder providing access to all methods supported on *account* resources.
|
||||
/// It is not used directly, but through the [`Adsense`] hub.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// Instantiate a resource builder
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate google_adsense2 as adsense2;
|
||||
///
|
||||
/// # async fn dox() {
|
||||
/// use std::default::Default;
|
||||
/// use adsense2::{Adsense, oauth2, hyper, hyper_rustls, chrono, FieldMask};
|
||||
///
|
||||
/// let secret: oauth2::ApplicationSecret = Default::default();
|
||||
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
|
||||
/// secret,
|
||||
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
|
||||
/// ).build().await.unwrap();
|
||||
/// let mut hub = Adsense::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `adclients_adunits_create(...)`, `adclients_adunits_get(...)`, `adclients_adunits_get_adcode(...)`, `adclients_adunits_list(...)`, `adclients_adunits_list_linked_custom_channels(...)`, `adclients_adunits_patch(...)`, `adclients_customchannels_create(...)`, `adclients_customchannels_delete(...)`, `adclients_customchannels_get(...)`, `adclients_customchannels_list(...)`, `adclients_customchannels_list_linked_ad_units(...)`, `adclients_customchannels_patch(...)`, `adclients_get(...)`, `adclients_get_adcode(...)`, `adclients_list(...)`, `adclients_urlchannels_get(...)`, `adclients_urlchannels_list(...)`, `alerts_list(...)`, `get(...)`, `get_ad_blocking_recovery_tag(...)`, `list(...)`, `list_child_accounts(...)`, `payments_list(...)`, `reports_generate(...)`, `reports_generate_csv(...)`, `reports_get_saved(...)`, `reports_saved_generate(...)`, `reports_saved_generate_csv(...)`, `reports_saved_list(...)`, `sites_get(...)` and `sites_list(...)`
|
||||
/// // to build up your call.
|
||||
/// let rb = hub.accounts();
|
||||
/// # }
|
||||
/// ```
|
||||
pub struct AccountMethods<'a, S>
|
||||
where S: 'a {
|
||||
|
||||
pub(super) hub: &'a Adsense<S>,
|
||||
}
|
||||
|
||||
impl<'a, S> client::MethodsBuilder for AccountMethods<'a, S> {}
|
||||
|
||||
impl<'a, S> AccountMethods<'a, S> {
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. Note that ad units can only be created for ad clients with an “AFC” product code. For more info see the [AdClient resource](https://developers.google.com/adsense/management/reference/rest/v2/accounts.adclients). For now, this method can only be used to create `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_adunits_create(&self, request: AdUnit, parent: &str) -> AccountAdclientAdunitCreateCall<'a, S> {
|
||||
AccountAdclientAdunitCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets an ad unit from a specified account and ad client.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. AdUnit to get information about. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
|
||||
pub fn adclients_adunits_get(&self, name: &str) -> AccountAdclientAdunitGetCall<'a, S> {
|
||||
AccountAdclientAdunitGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the ad unit code for a given ad unit. For more information, see [About the AdSense code](https://support.google.com/adsense/answer/9274634) and [Where to place the ad code in your HTML](https://support.google.com/adsense/answer/9190028).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
|
||||
pub fn adclients_adunits_get_adcode(&self, name: &str) -> AccountAdclientAdunitGetAdcodeCall<'a, S> {
|
||||
AccountAdclientAdunitGetAdcodeCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all ad units under a specified account and ad client.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_adunits_list(&self, parent: &str) -> AccountAdclientAdunitListCall<'a, S> {
|
||||
AccountAdclientAdunitListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the custom channels available for an ad unit.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
|
||||
pub fn adclients_adunits_list_linked_custom_channels(&self, parent: &str) -> AccountAdclientAdunitListLinkedCustomChannelCall<'a, S> {
|
||||
AccountAdclientAdunitListLinkedCustomChannelCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates an ad unit. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product. For now, this method can only be used to update `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
|
||||
pub fn adclients_adunits_patch(&self, request: AdUnit, name: &str) -> AccountAdclientAdunitPatchCall<'a, S> {
|
||||
AccountAdclientAdunitPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Creates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `parent` - Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_customchannels_create(&self, request: CustomChannel, parent: &str) -> AccountAdclientCustomchannelCreateCall<'a, S> {
|
||||
AccountAdclientCustomchannelCreateCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Deletes a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
|
||||
pub fn adclients_customchannels_delete(&self, name: &str) -> AccountAdclientCustomchannelDeleteCall<'a, S> {
|
||||
AccountAdclientCustomchannelDeleteCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about the selected custom channel.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
|
||||
pub fn adclients_customchannels_get(&self, name: &str) -> AccountAdclientCustomchannelGetCall<'a, S> {
|
||||
AccountAdclientCustomchannelGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the custom channels available in an ad client.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The ad client which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_customchannels_list(&self, parent: &str) -> AccountAdclientCustomchannelListCall<'a, S> {
|
||||
AccountAdclientCustomchannelListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the ad units available for a custom channel.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The custom channel which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
|
||||
pub fn adclients_customchannels_list_linked_ad_units(&self, parent: &str) -> AccountAdclientCustomchannelListLinkedAdUnitCall<'a, S> {
|
||||
AccountAdclientCustomchannelListLinkedAdUnitCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Updates a custom channel. This method can only be used by projects enabled for the [AdSense for Platforms](https://developers.google.com/adsense/platforms/) product.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `request` - No description provided.
|
||||
/// * `name` - Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
|
||||
pub fn adclients_customchannels_patch(&self, request: CustomChannel, name: &str) -> AccountAdclientCustomchannelPatchCall<'a, S> {
|
||||
AccountAdclientCustomchannelPatchCall {
|
||||
hub: self.hub,
|
||||
_request: request,
|
||||
_name: name.to_string(),
|
||||
_update_mask: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about the selected url channel.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. The name of the url channel to retrieve. Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}
|
||||
pub fn adclients_urlchannels_get(&self, name: &str) -> AccountAdclientUrlchannelGetCall<'a, S> {
|
||||
AccountAdclientUrlchannelGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists active url channels.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The ad client which owns the collection of url channels. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_urlchannels_list(&self, parent: &str) -> AccountAdclientUrlchannelListCall<'a, S> {
|
||||
AccountAdclientUrlchannelListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the ad client from the given resource name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. The name of the ad client to retrieve. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_get(&self, name: &str) -> AccountAdclientGetCall<'a, S> {
|
||||
AccountAdclientGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the AdSense code for a given ad client. This returns what was previously known as the 'auto ad code'. This is only supported for ad clients with a product_code of AFC. For more information, see [About the AdSense code](https://support.google.com/adsense/answer/9274634).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the ad client for which to get the adcode. Format: accounts/{account}/adclients/{adclient}
|
||||
pub fn adclients_get_adcode(&self, name: &str) -> AccountAdclientGetAdcodeCall<'a, S> {
|
||||
AccountAdclientGetAdcodeCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the ad clients available in an account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The account which owns the collection of ad clients. Format: accounts/{account}
|
||||
pub fn adclients_list(&self, parent: &str) -> AccountAdclientListCall<'a, S> {
|
||||
AccountAdclientListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the alerts available in an account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The account which owns the collection of alerts. Format: accounts/{account}
|
||||
pub fn alerts_list(&self, parent: &str) -> AccountAlertListCall<'a, S> {
|
||||
AccountAlertListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_language_code: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the payments available for an account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The account which owns the collection of payments. Format: accounts/{account}
|
||||
pub fn payments_list(&self, parent: &str) -> AccountPaymentListCall<'a, S> {
|
||||
AccountPaymentListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Generates a saved report.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the saved report. Format: accounts/{account}/reports/{report}
|
||||
pub fn reports_saved_generate(&self, name: &str) -> AccountReportSavedGenerateCall<'a, S> {
|
||||
AccountReportSavedGenerateCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_start_date_year: Default::default(),
|
||||
_start_date_month: Default::default(),
|
||||
_start_date_day: Default::default(),
|
||||
_reporting_time_zone: Default::default(),
|
||||
_language_code: Default::default(),
|
||||
_end_date_year: Default::default(),
|
||||
_end_date_month: Default::default(),
|
||||
_end_date_day: Default::default(),
|
||||
_date_range: Default::default(),
|
||||
_currency_code: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Generates a csv formatted saved report.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the saved report. Format: accounts/{account}/reports/{report}
|
||||
pub fn reports_saved_generate_csv(&self, name: &str) -> AccountReportSavedGenerateCsvCall<'a, S> {
|
||||
AccountReportSavedGenerateCsvCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_start_date_year: Default::default(),
|
||||
_start_date_month: Default::default(),
|
||||
_start_date_day: Default::default(),
|
||||
_reporting_time_zone: Default::default(),
|
||||
_language_code: Default::default(),
|
||||
_end_date_year: Default::default(),
|
||||
_end_date_month: Default::default(),
|
||||
_end_date_day: Default::default(),
|
||||
_date_range: Default::default(),
|
||||
_currency_code: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists saved reports.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The account which owns the collection of reports. Format: accounts/{account}
|
||||
pub fn reports_saved_list(&self, parent: &str) -> AccountReportSavedListCall<'a, S> {
|
||||
AccountReportSavedListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Generates an ad hoc report.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `account` - Required. The account which owns the collection of reports. Format: accounts/{account}
|
||||
pub fn reports_generate(&self, account: &str) -> AccountReportGenerateCall<'a, S> {
|
||||
AccountReportGenerateCall {
|
||||
hub: self.hub,
|
||||
_account: account.to_string(),
|
||||
_start_date_year: Default::default(),
|
||||
_start_date_month: Default::default(),
|
||||
_start_date_day: Default::default(),
|
||||
_reporting_time_zone: Default::default(),
|
||||
_order_by: Default::default(),
|
||||
_metrics: Default::default(),
|
||||
_limit: Default::default(),
|
||||
_language_code: Default::default(),
|
||||
_filters: Default::default(),
|
||||
_end_date_year: Default::default(),
|
||||
_end_date_month: Default::default(),
|
||||
_end_date_day: Default::default(),
|
||||
_dimensions: Default::default(),
|
||||
_date_range: Default::default(),
|
||||
_currency_code: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Generates a csv formatted ad hoc report.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `account` - Required. The account which owns the collection of reports. Format: accounts/{account}
|
||||
pub fn reports_generate_csv(&self, account: &str) -> AccountReportGenerateCsvCall<'a, S> {
|
||||
AccountReportGenerateCsvCall {
|
||||
hub: self.hub,
|
||||
_account: account.to_string(),
|
||||
_start_date_year: Default::default(),
|
||||
_start_date_month: Default::default(),
|
||||
_start_date_day: Default::default(),
|
||||
_reporting_time_zone: Default::default(),
|
||||
_order_by: Default::default(),
|
||||
_metrics: Default::default(),
|
||||
_limit: Default::default(),
|
||||
_language_code: Default::default(),
|
||||
_filters: Default::default(),
|
||||
_end_date_year: Default::default(),
|
||||
_end_date_month: Default::default(),
|
||||
_end_date_day: Default::default(),
|
||||
_dimensions: Default::default(),
|
||||
_date_range: Default::default(),
|
||||
_currency_code: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the saved report from the given resource name.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report}
|
||||
pub fn reports_get_saved(&self, name: &str) -> AccountReportGetSavedCall<'a, S> {
|
||||
AccountReportGetSavedCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about the selected site.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Name of the site. Format: accounts/{account}/sites/{site}
|
||||
pub fn sites_get(&self, name: &str) -> AccountSiteGetCall<'a, S> {
|
||||
AccountSiteGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all the sites available in an account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The account which owns the collection of sites. Format: accounts/{account}
|
||||
pub fn sites_list(&self, parent: &str) -> AccountSiteListCall<'a, S> {
|
||||
AccountSiteListCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets information about the selected AdSense account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. Account to get information about. Format: accounts/{account}
|
||||
pub fn get(&self, name: &str) -> AccountGetCall<'a, S> {
|
||||
AccountGetCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Gets the ad blocking recovery tag of an account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `name` - Required. The name of the account to get the tag for. Format: accounts/{account}
|
||||
pub fn get_ad_blocking_recovery_tag(&self, name: &str) -> AccountGetAdBlockingRecoveryTagCall<'a, S> {
|
||||
AccountGetAdBlockingRecoveryTagCall {
|
||||
hub: self.hub,
|
||||
_name: name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all accounts available to this user.
|
||||
pub fn list(&self) -> AccountListCall<'a, S> {
|
||||
AccountListCall {
|
||||
hub: self.hub,
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a builder to help you perform the following task:
|
||||
///
|
||||
/// Lists all accounts directly managed by the given AdSense account.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `parent` - Required. The parent account, which owns the child accounts. Format: accounts/{account}
|
||||
pub fn list_child_accounts(&self, parent: &str) -> AccountListChildAccountCall<'a, S> {
|
||||
AccountListChildAccountCall {
|
||||
hub: self.hub,
|
||||
_parent: parent.to_string(),
|
||||
_page_token: Default::default(),
|
||||
_page_size: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
32
gen/adsense2/src/api/mod.rs
Normal file
32
gen/adsense2/src/api/mod.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
use std::collections::HashMap;
|
||||
use std::cell::RefCell;
|
||||
use std::default::Default;
|
||||
use std::collections::BTreeSet;
|
||||
use std::error::Error as StdError;
|
||||
use serde_json as json;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::mem;
|
||||
|
||||
use hyper::client::connect;
|
||||
use tokio::io::{AsyncRead, AsyncWrite};
|
||||
use tokio::time::sleep;
|
||||
use tower_service;
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
use crate::{client, client::GetToken, client::serde_with};
|
||||
|
||||
mod utilities;
|
||||
pub use utilities::*;
|
||||
|
||||
mod hub;
|
||||
pub use hub::*;
|
||||
|
||||
mod schemas;
|
||||
pub use schemas::*;
|
||||
|
||||
mod method_builders;
|
||||
pub use method_builders::*;
|
||||
|
||||
mod call_builders;
|
||||
pub use call_builders::*;
|
||||
846
gen/adsense2/src/api/schemas.rs
Normal file
846
gen/adsense2/src/api/schemas.rs
Normal file
@@ -0,0 +1,846 @@
|
||||
use super::*;
|
||||
/// Representation of an account.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients adunits create accounts](AccountAdclientAdunitCreateCall) (none)
|
||||
/// * [adclients adunits get accounts](AccountAdclientAdunitGetCall) (none)
|
||||
/// * [adclients adunits get adcode accounts](AccountAdclientAdunitGetAdcodeCall) (none)
|
||||
/// * [adclients adunits list accounts](AccountAdclientAdunitListCall) (none)
|
||||
/// * [adclients adunits list linked custom channels accounts](AccountAdclientAdunitListLinkedCustomChannelCall) (none)
|
||||
/// * [adclients adunits patch accounts](AccountAdclientAdunitPatchCall) (none)
|
||||
/// * [adclients customchannels create accounts](AccountAdclientCustomchannelCreateCall) (none)
|
||||
/// * [adclients customchannels delete accounts](AccountAdclientCustomchannelDeleteCall) (none)
|
||||
/// * [adclients customchannels get accounts](AccountAdclientCustomchannelGetCall) (none)
|
||||
/// * [adclients customchannels list accounts](AccountAdclientCustomchannelListCall) (none)
|
||||
/// * [adclients customchannels list linked ad units accounts](AccountAdclientCustomchannelListLinkedAdUnitCall) (none)
|
||||
/// * [adclients customchannels patch accounts](AccountAdclientCustomchannelPatchCall) (none)
|
||||
/// * [adclients urlchannels get accounts](AccountAdclientUrlchannelGetCall) (none)
|
||||
/// * [adclients urlchannels list accounts](AccountAdclientUrlchannelListCall) (none)
|
||||
/// * [adclients get accounts](AccountAdclientGetCall) (none)
|
||||
/// * [adclients get adcode accounts](AccountAdclientGetAdcodeCall) (none)
|
||||
/// * [adclients list accounts](AccountAdclientListCall) (none)
|
||||
/// * [alerts list accounts](AccountAlertListCall) (none)
|
||||
/// * [payments list accounts](AccountPaymentListCall) (none)
|
||||
/// * [reports saved generate accounts](AccountReportSavedGenerateCall) (none)
|
||||
/// * [reports saved generate csv accounts](AccountReportSavedGenerateCsvCall) (none)
|
||||
/// * [reports saved list accounts](AccountReportSavedListCall) (none)
|
||||
/// * [reports generate accounts](AccountReportGenerateCall) (none)
|
||||
/// * [reports generate csv accounts](AccountReportGenerateCsvCall) (none)
|
||||
/// * [reports get saved accounts](AccountReportGetSavedCall) (none)
|
||||
/// * [sites get accounts](AccountSiteGetCall) (none)
|
||||
/// * [sites list accounts](AccountSiteListCall) (none)
|
||||
/// * [get accounts](AccountGetCall) (response)
|
||||
/// * [get ad blocking recovery tag accounts](AccountGetAdBlockingRecoveryTagCall) (none)
|
||||
/// * [list accounts](AccountListCall) (none)
|
||||
/// * [list child accounts accounts](AccountListChildAccountCall) (none)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Account {
|
||||
/// Output only. Creation time of the account.
|
||||
#[serde(rename="createTime")]
|
||||
|
||||
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
|
||||
/// Output only. Display name of this account.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// Output only. Resource name of the account. Format: accounts/pub-[0-9]+
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Outstanding tasks that need to be completed as part of the sign-up process for a new account. e.g. "billing-profile-creation", "phone-pin-verification".
|
||||
#[serde(rename="pendingTasks")]
|
||||
|
||||
pub pending_tasks: Option<Vec<String>>,
|
||||
/// Output only. Whether this account is premium.
|
||||
|
||||
pub premium: Option<bool>,
|
||||
/// Output only. State of the account.
|
||||
|
||||
pub state: Option<String>,
|
||||
/// The account time zone, as used by reporting. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
|
||||
#[serde(rename="timeZone")]
|
||||
|
||||
pub time_zone: Option<TimeZone>,
|
||||
}
|
||||
|
||||
impl client::Resource for Account {}
|
||||
impl client::ResponseResult for Account {}
|
||||
|
||||
|
||||
/// Representation of an ad blocking recovery tag. See https://support.google.com/adsense/answer/11575177.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [get ad blocking recovery tag accounts](AccountGetAdBlockingRecoveryTagCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdBlockingRecoveryTag {
|
||||
/// Error protection code that can be used in conjunction with the tag. It'll display a message to users if an [ad blocking extension blocks their access to your site](https://support.google.com/adsense/answer/11575480).
|
||||
#[serde(rename="errorProtectionCode")]
|
||||
|
||||
pub error_protection_code: Option<String>,
|
||||
/// The ad blocking recovery tag. Note that the message generated by the tag can be blocked by an ad blocking extension. If this is not your desired outcome, then you'll need to use it in conjunction with the error protection code.
|
||||
|
||||
pub tag: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for AdBlockingRecoveryTag {}
|
||||
|
||||
|
||||
/// Representation of an ad client. An ad client represents a user’s subscription with a specific AdSense product.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients get accounts](AccountAdclientGetCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdClient {
|
||||
/// Output only. Resource name of the ad client. Format: accounts/{account}/adclients/{adclient}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Reporting product code of the ad client. For example, "AFC" for AdSense for Content. Corresponds to the `PRODUCT_CODE` dimension, and present only if the ad client supports reporting.
|
||||
#[serde(rename="productCode")]
|
||||
|
||||
pub product_code: Option<String>,
|
||||
/// Output only. Unique ID of the ad client as used in the `AD_CLIENT_ID` reporting dimension. Present only if the ad client supports reporting.
|
||||
#[serde(rename="reportingDimensionId")]
|
||||
|
||||
pub reporting_dimension_id: Option<String>,
|
||||
/// Output only. State of the ad client.
|
||||
|
||||
pub state: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for AdClient {}
|
||||
|
||||
|
||||
/// Representation of the AdSense code for a given ad client. For more information, see [About the AdSense code](https://support.google.com/adsense/answer/9274634).
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients get adcode accounts](AccountAdclientGetAdcodeCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdClientAdCode {
|
||||
/// Output only. The AdSense code snippet to add to the head of an HTML page.
|
||||
#[serde(rename="adCode")]
|
||||
|
||||
pub ad_code: Option<String>,
|
||||
/// Output only. The AdSense code snippet to add to the body of an AMP page.
|
||||
#[serde(rename="ampBody")]
|
||||
|
||||
pub amp_body: Option<String>,
|
||||
/// Output only. The AdSense code snippet to add to the head of an AMP page.
|
||||
#[serde(rename="ampHead")]
|
||||
|
||||
pub amp_head: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for AdClientAdCode {}
|
||||
|
||||
|
||||
/// Representation of an ad unit. An ad unit represents a saved ad unit with a specific set of ad settings that have been customized within an account.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients adunits create accounts](AccountAdclientAdunitCreateCall) (request|response)
|
||||
/// * [adclients adunits get accounts](AccountAdclientAdunitGetCall) (response)
|
||||
/// * [adclients adunits patch accounts](AccountAdclientAdunitPatchCall) (request|response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdUnit {
|
||||
/// Required. Settings specific to content ads (AFC).
|
||||
#[serde(rename="contentAdsSettings")]
|
||||
|
||||
pub content_ads_settings: Option<ContentAdsSettings>,
|
||||
/// Required. Display name of the ad unit, as provided when the ad unit was created.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Unique ID of the ad unit as used in the `AD_UNIT_ID` reporting dimension.
|
||||
#[serde(rename="reportingDimensionId")]
|
||||
|
||||
pub reporting_dimension_id: Option<String>,
|
||||
/// State of the ad unit.
|
||||
|
||||
pub state: Option<String>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for AdUnit {}
|
||||
impl client::ResponseResult for AdUnit {}
|
||||
|
||||
|
||||
/// Representation of the ad unit code for a given ad unit. For more information, see [About the AdSense code](https://support.google.com/adsense/answer/9274634) and [Where to place the ad code in your HTML](https://support.google.com/adsense/answer/9190028).
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients adunits get adcode accounts](AccountAdclientAdunitGetAdcodeCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AdUnitAdCode {
|
||||
/// Output only. The code snippet to add to the body of an HTML page.
|
||||
#[serde(rename="adCode")]
|
||||
|
||||
pub ad_code: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for AdUnitAdCode {}
|
||||
|
||||
|
||||
/// Representation of an alert.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Alert {
|
||||
/// Output only. The localized alert message. This may contain HTML markup, such as phrase elements or links.
|
||||
|
||||
pub message: Option<String>,
|
||||
/// Output only. Resource name of the alert. Format: accounts/{account}/alerts/{alert}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Severity of this alert.
|
||||
|
||||
pub severity: Option<String>,
|
||||
/// Output only. Type of alert. This identifies the broad type of this alert, and provides a stable machine-readable identifier that will not be translated. For example, "payment-hold".
|
||||
#[serde(rename="type")]
|
||||
|
||||
pub type_: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for Alert {}
|
||||
|
||||
|
||||
/// Cell representation.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Cell {
|
||||
/// Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
|
||||
|
||||
pub value: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for Cell {}
|
||||
|
||||
|
||||
/// Settings specific to content ads (AFC).
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ContentAdsSettings {
|
||||
/// Required. Size of the ad unit. e.g. "728x90", "1x3" (for responsive ad units).
|
||||
|
||||
pub size: Option<String>,
|
||||
/// Required. Type of the ad unit.
|
||||
#[serde(rename="type")]
|
||||
|
||||
pub type_: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for ContentAdsSettings {}
|
||||
|
||||
|
||||
/// Representation of a custom channel.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients customchannels create accounts](AccountAdclientCustomchannelCreateCall) (request|response)
|
||||
/// * [adclients customchannels get accounts](AccountAdclientCustomchannelGetCall) (response)
|
||||
/// * [adclients customchannels patch accounts](AccountAdclientCustomchannelPatchCall) (request|response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct CustomChannel {
|
||||
/// Whether the custom channel is active and collecting data. See https://support.google.com/adsense/answer/10077192.
|
||||
|
||||
pub active: Option<bool>,
|
||||
/// Required. Display name of the custom channel.
|
||||
#[serde(rename="displayName")]
|
||||
|
||||
pub display_name: Option<String>,
|
||||
/// Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Unique ID of the custom channel as used in the `CUSTOM_CHANNEL_ID` reporting dimension.
|
||||
#[serde(rename="reportingDimensionId")]
|
||||
|
||||
pub reporting_dimension_id: Option<String>,
|
||||
}
|
||||
|
||||
impl client::RequestValue for CustomChannel {}
|
||||
impl client::ResponseResult for CustomChannel {}
|
||||
|
||||
|
||||
/// Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Date {
|
||||
/// Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
|
||||
|
||||
pub day: Option<i32>,
|
||||
/// Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
|
||||
|
||||
pub month: Option<i32>,
|
||||
/// Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
|
||||
|
||||
pub year: Option<i32>,
|
||||
}
|
||||
|
||||
impl client::Part for Date {}
|
||||
|
||||
|
||||
/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients customchannels delete accounts](AccountAdclientCustomchannelDeleteCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Empty { _never_set: Option<bool> }
|
||||
|
||||
impl client::ResponseResult for Empty {}
|
||||
|
||||
|
||||
/// The header information of the columns requested in the report.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Header {
|
||||
/// The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) of this column. Only present if the header type is METRIC_CURRENCY.
|
||||
#[serde(rename="currencyCode")]
|
||||
|
||||
pub currency_code: Option<String>,
|
||||
/// Required. Name of the header.
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Required. Type of the header.
|
||||
#[serde(rename="type")]
|
||||
|
||||
pub type_: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for Header {}
|
||||
|
||||
|
||||
/// Message that represents an arbitrary HTTP body. It should only be used for payload formats that can’t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [reports saved generate csv accounts](AccountReportSavedGenerateCsvCall) (response)
|
||||
/// * [reports generate csv accounts](AccountReportGenerateCsvCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct HttpBody {
|
||||
/// The HTTP Content-Type header value specifying the content type of the body.
|
||||
#[serde(rename="contentType")]
|
||||
|
||||
pub content_type: Option<String>,
|
||||
/// The HTTP request/response body as raw binary.
|
||||
|
||||
#[serde_as(as = "Option<::client::serde::urlsafe_base64::Wrapper>")]
|
||||
pub data: Option<Vec<u8>>,
|
||||
/// Application specific response metadata. Must be set in the first response for streaming APIs.
|
||||
|
||||
pub extensions: Option<Vec<HashMap<String, json::Value>>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for HttpBody {}
|
||||
|
||||
|
||||
/// Response definition for the account list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list accounts](AccountListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListAccountsResponse {
|
||||
/// The accounts returned in this list response.
|
||||
|
||||
pub accounts: Option<Vec<Account>>,
|
||||
/// Continuation token used to page through accounts. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListAccountsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the ad client list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients list accounts](AccountAdclientListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListAdClientsResponse {
|
||||
/// The ad clients returned in this list response.
|
||||
#[serde(rename="adClients")]
|
||||
|
||||
pub ad_clients: Option<Vec<AdClient>>,
|
||||
/// Continuation token used to page through ad clients. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListAdClientsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the adunit list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients adunits list accounts](AccountAdclientAdunitListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListAdUnitsResponse {
|
||||
/// The ad units returned in the list response.
|
||||
#[serde(rename="adUnits")]
|
||||
|
||||
pub ad_units: Option<Vec<AdUnit>>,
|
||||
/// Continuation token used to page through ad units. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListAdUnitsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the alerts list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [alerts list accounts](AccountAlertListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListAlertsResponse {
|
||||
/// The alerts returned in this list response.
|
||||
|
||||
pub alerts: Option<Vec<Alert>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListAlertsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the child account list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [list child accounts accounts](AccountListChildAccountCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListChildAccountsResponse {
|
||||
/// The accounts returned in this list response.
|
||||
|
||||
pub accounts: Option<Vec<Account>>,
|
||||
/// Continuation token used to page through accounts. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListChildAccountsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the custom channel list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients customchannels list accounts](AccountAdclientCustomchannelListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListCustomChannelsResponse {
|
||||
/// The custom channels returned in this list response.
|
||||
#[serde(rename="customChannels")]
|
||||
|
||||
pub custom_channels: Option<Vec<CustomChannel>>,
|
||||
/// Continuation token used to page through alerts. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListCustomChannelsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the ad units linked to a custom channel list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients customchannels list linked ad units accounts](AccountAdclientCustomchannelListLinkedAdUnitCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListLinkedAdUnitsResponse {
|
||||
/// The ad units returned in the list response.
|
||||
#[serde(rename="adUnits")]
|
||||
|
||||
pub ad_units: Option<Vec<AdUnit>>,
|
||||
/// Continuation token used to page through ad units. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListLinkedAdUnitsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the custom channels linked to an adunit list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients adunits list linked custom channels accounts](AccountAdclientAdunitListLinkedCustomChannelCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListLinkedCustomChannelsResponse {
|
||||
/// The custom channels returned in this list response.
|
||||
#[serde(rename="customChannels")]
|
||||
|
||||
pub custom_channels: Option<Vec<CustomChannel>>,
|
||||
/// Continuation token used to page through alerts. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListLinkedCustomChannelsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the payments list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [payments list accounts](AccountPaymentListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListPaymentsResponse {
|
||||
/// The payments returned in this list response.
|
||||
|
||||
pub payments: Option<Vec<Payment>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListPaymentsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the saved reports list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [reports saved list accounts](AccountReportSavedListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListSavedReportsResponse {
|
||||
/// Continuation token used to page through reports. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// The reports returned in this list response.
|
||||
#[serde(rename="savedReports")]
|
||||
|
||||
pub saved_reports: Option<Vec<SavedReport>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListSavedReportsResponse {}
|
||||
|
||||
|
||||
/// Response definition for the sites list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [sites list accounts](AccountSiteListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListSitesResponse {
|
||||
/// Continuation token used to page through sites. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// The sites returned in this list response.
|
||||
|
||||
pub sites: Option<Vec<Site>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListSitesResponse {}
|
||||
|
||||
|
||||
/// Response definition for the url channels list rpc.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients urlchannels list accounts](AccountAdclientUrlchannelListCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ListUrlChannelsResponse {
|
||||
/// Continuation token used to page through url channels. To retrieve the next page of the results, set the next request's "page_token" value to this.
|
||||
#[serde(rename="nextPageToken")]
|
||||
|
||||
pub next_page_token: Option<String>,
|
||||
/// The url channels returned in this list response.
|
||||
#[serde(rename="urlChannels")]
|
||||
|
||||
pub url_channels: Option<Vec<UrlChannel>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ListUrlChannelsResponse {}
|
||||
|
||||
|
||||
/// Representation of an unpaid or paid payment. See [Payment timelines for AdSense](https://support.google.com/adsense/answer/7164703) for more information about payments and the [YouTube homepage and payments account](https://support.google.com/adsense/answer/11622510) article for information about dedicated payments accounts for YouTube.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Payment {
|
||||
/// Output only. The amount of unpaid or paid earnings, as a formatted string, including the currency. E.g. "¥1,235 JPY", "$1,234.57", "£87.65".
|
||||
|
||||
pub amount: Option<String>,
|
||||
/// Output only. For paid earnings, the date that the payment was credited. For unpaid earnings, this field is empty. Payment dates are always returned in the billing timezone (America/Los_Angeles).
|
||||
|
||||
pub date: Option<Date>,
|
||||
/// Output only. Resource name of the payment. Format: - accounts/{account}/payments/unpaid for unpaid (current) AdSense earnings. - accounts/{account}/payments/youtube-unpaid for unpaid (current) YouTube earnings. - accounts/{account}/payments/yyyy-MM-dd for paid AdSense earnings. - accounts/{account}/payments/youtube-yyyy-MM-dd for paid YouTube earnings.
|
||||
|
||||
pub name: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for Payment {}
|
||||
|
||||
|
||||
/// Result of a generated report.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [reports saved generate accounts](AccountReportSavedGenerateCall) (response)
|
||||
/// * [reports generate accounts](AccountReportGenerateCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct ReportResult {
|
||||
/// The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
|
||||
|
||||
pub averages: Option<Row>,
|
||||
/// Required. End date of the range (inclusive).
|
||||
#[serde(rename="endDate")]
|
||||
|
||||
pub end_date: Option<Date>,
|
||||
/// The header information; one for each dimension in the request, followed by one for each metric in the request.
|
||||
|
||||
pub headers: Option<Vec<Header>>,
|
||||
/// The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request.
|
||||
|
||||
pub rows: Option<Vec<Row>>,
|
||||
/// Required. Start date of the range (inclusive).
|
||||
#[serde(rename="startDate")]
|
||||
|
||||
pub start_date: Option<Date>,
|
||||
/// The total number of rows matched by the report request.
|
||||
#[serde(rename="totalMatchedRows")]
|
||||
|
||||
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
|
||||
pub total_matched_rows: Option<i64>,
|
||||
/// The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
|
||||
|
||||
pub totals: Option<Row>,
|
||||
/// Any warnings associated with generation of the report. These warnings are always returned in English.
|
||||
|
||||
pub warnings: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for ReportResult {}
|
||||
|
||||
|
||||
/// Row representation.
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Row {
|
||||
/// Cells in the row.
|
||||
|
||||
pub cells: Option<Vec<Cell>>,
|
||||
}
|
||||
|
||||
impl client::Part for Row {}
|
||||
|
||||
|
||||
/// Representation of a saved report.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [reports get saved accounts](AccountReportGetSavedCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct SavedReport {
|
||||
/// Output only. Resource name of the report. Format: accounts/{account}/reports/{report}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Report title as specified by publisher.
|
||||
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for SavedReport {}
|
||||
|
||||
|
||||
/// Representation of a Site.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [sites get accounts](AccountSiteGetCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Site {
|
||||
/// Whether auto ads is turned on for the site.
|
||||
#[serde(rename="autoAdsEnabled")]
|
||||
|
||||
pub auto_ads_enabled: Option<bool>,
|
||||
/// Domain (or subdomain) of the site, e.g. "example.com" or "www.example.com". This is used in the `OWNED_SITE_DOMAIN_NAME` reporting dimension.
|
||||
|
||||
pub domain: Option<String>,
|
||||
/// Output only. Resource name of a site. Format: accounts/{account}/sites/{site}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Unique ID of the site as used in the `OWNED_SITE_ID` reporting dimension.
|
||||
#[serde(rename="reportingDimensionId")]
|
||||
|
||||
pub reporting_dimension_id: Option<String>,
|
||||
/// Output only. State of a site.
|
||||
|
||||
pub state: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for Site {}
|
||||
|
||||
|
||||
/// Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).
|
||||
///
|
||||
/// This type is not used in any activity, and only used as *part* of another schema.
|
||||
///
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct TimeZone {
|
||||
/// IANA Time Zone Database time zone, e.g. "America/New_York".
|
||||
|
||||
pub id: Option<String>,
|
||||
/// Optional. IANA Time Zone Database version number, e.g. "2019a".
|
||||
|
||||
pub version: Option<String>,
|
||||
}
|
||||
|
||||
impl client::Part for TimeZone {}
|
||||
|
||||
|
||||
/// Representation of a URL channel. URL channels allow you to track the performance of particular pages in your site; see [URL channels](https://support.google.com/adsense/answer/2923836) for more information.
|
||||
///
|
||||
/// # Activities
|
||||
///
|
||||
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
|
||||
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
|
||||
///
|
||||
/// * [adclients urlchannels get accounts](AccountAdclientUrlchannelGetCall) (response)
|
||||
#[serde_with::serde_as(crate = "::client::serde_with")]
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct UrlChannel {
|
||||
/// Output only. Resource name of the URL channel. Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}
|
||||
|
||||
pub name: Option<String>,
|
||||
/// Output only. Unique ID of the custom channel as used in the `URL_CHANNEL_ID` reporting dimension.
|
||||
#[serde(rename="reportingDimensionId")]
|
||||
|
||||
pub reporting_dimension_id: Option<String>,
|
||||
/// URI pattern of the channel. Does not include "http://" or "https://". Example: www.example.com/home
|
||||
#[serde(rename="uriPattern")]
|
||||
|
||||
pub uri_pattern: Option<String>,
|
||||
}
|
||||
|
||||
impl client::ResponseResult for UrlChannel {}
|
||||
|
||||
|
||||
28
gen/adsense2/src/api/utilities.rs
Normal file
28
gen/adsense2/src/api/utilities.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use super::*;
|
||||
/// Identifies the an OAuth2 authorization scope.
|
||||
/// A scope is needed when requesting an
|
||||
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
|
||||
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
|
||||
pub enum Scope {
|
||||
/// View and manage your AdSense data
|
||||
Full,
|
||||
|
||||
/// View your AdSense data
|
||||
Readonly,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Scope {
|
||||
fn as_ref(&self) -> &str {
|
||||
match *self {
|
||||
Scope::Full => "https://www.googleapis.com/auth/adsense",
|
||||
Scope::Readonly => "https://www.googleapis.com/auth/adsense.readonly",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Scope {
|
||||
fn default() -> Scope {
|
||||
Scope::Readonly
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user