#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountBudgetProposalRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountBudgetProposalRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<AccountBudgetProposalOperation>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountBudgetProposalOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "account_budget_proposal_operation::Operation", tags = "2, 1")]
pub operation: ::core::option::Option<account_budget_proposal_operation::Operation>,
}
pub mod account_budget_proposal_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "2")]
Create(super::super::resources::AccountBudgetProposal),
#[prost(string, tag = "1")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountBudgetProposalResponse {
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<MutateAccountBudgetProposalResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountBudgetProposalResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod account_budget_proposal_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " A service for managing account-level budgets via proposals."]
#[doc = ""]
#[doc = " A proposal is a request to create a new budget or make changes to an"]
#[doc = " existing one."]
#[doc = ""]
#[doc = " Reads for account-level budgets managed by these proposals will be"]
#[doc = " supported in a future version. Until then, please use the"]
#[doc = " BudgetOrderService from the AdWords API. Learn more at"]
#[doc = " https://developers.google.com/adwords/api/docs/guides/budget-order"]
#[doc = ""]
#[doc = " Mutates:"]
#[doc = " The CREATE operation creates a new proposal."]
#[doc = " UPDATE operations aren't supported."]
#[doc = " The REMOVE operation cancels a pending proposal."]
#[derive(Debug, Clone)]
pub struct AccountBudgetProposalServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AccountBudgetProposalServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AccountBudgetProposalServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AccountBudgetProposalServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns an account-level budget proposal in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_account_budget_proposal(
&mut self,
request: impl tonic::IntoRequest<super::GetAccountBudgetProposalRequest>,
) -> Result<tonic::Response<super::super::resources::AccountBudgetProposal>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AccountBudgetProposalService/GetAccountBudgetProposal") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes account budget proposals. Operation statuses"]
#[doc = " are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AccountBudgetProposalError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_account_budget_proposal(
&mut self,
request: impl tonic::IntoRequest<super::MutateAccountBudgetProposalRequest>,
) -> Result<tonic::Response<super::MutateAccountBudgetProposalResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AccountBudgetProposalService/MutateAccountBudgetProposal") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountBudgetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod account_budget_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " A service for fetching an account-level budget."]
#[doc = ""]
#[doc = " Account-level budgets are mutated by creating proposal resources."]
#[derive(Debug, Clone)]
pub struct AccountBudgetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AccountBudgetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AccountBudgetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AccountBudgetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns an account-level budget in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_account_budget(
&mut self,
request: impl tonic::IntoRequest<super::GetAccountBudgetRequest>,
) -> Result<tonic::Response<super::super::resources::AccountBudget>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AccountBudgetService/GetAccountBudget",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAccountLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAccountLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub account_link: ::core::option::Option<super::resources::AccountLink>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAccountLinkResponse {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<AccountLinkOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountLinkOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "account_link_operation::Operation", tags = "2, 3")]
pub operation: ::core::option::Option<account_link_operation::Operation>,
}
pub mod account_link_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "2")]
Update(super::super::resources::AccountLink),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountLinkResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateAccountLinkResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAccountLinkResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod account_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service allows management of links between Google Ads accounts and other"]
#[doc = " accounts."]
#[derive(Debug, Clone)]
pub struct AccountLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AccountLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AccountLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AccountLinkServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the account link in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_account_link(
&mut self,
request: impl tonic::IntoRequest<super::GetAccountLinkRequest>,
) -> Result<tonic::Response<super::super::resources::AccountLink>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AccountLinkService/GetAccountLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates an account link."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ThirdPartyAppAnalyticsLinkError]()"]
pub async fn create_account_link(
&mut self,
request: impl tonic::IntoRequest<super::CreateAccountLinkRequest>,
) -> Result<tonic::Response<super::CreateAccountLinkResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AccountLinkService/CreateAccountLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes an account link."]
#[doc = " From V5, create is not supported through"]
#[doc = " AccountLinkService.MutateAccountLink. Please use"]
#[doc = " AccountLinkService.CreateAccountLink instead."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AccountLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_account_link(
&mut self,
request: impl tonic::IntoRequest<super::MutateAccountLinkRequest>,
) -> Result<tonic::Response<super::MutateAccountLinkResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AccountLinkService/MutateAccountLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupAdAssetViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_ad_asset_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch ad group ad asset views."]
#[derive(Debug, Clone)]
pub struct AdGroupAdAssetViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupAdAssetViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupAdAssetViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupAdAssetViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group ad asset view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_ad_asset_view(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupAdAssetViewRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupAdAssetView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAdAssetViewService/GetAdGroupAdAssetView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupAdLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupAdLabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupAdLabelOperation {
#[prost(oneof = "ad_group_ad_label_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<ad_group_ad_label_operation::Operation>,
}
pub mod ad_group_ad_label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupAdLabel),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupAdLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_ad_label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels on ad group ads."]
#[derive(Debug, Clone)]
pub struct AdGroupAdLabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupAdLabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupAdLabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupAdLabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group ad label in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_ad_label(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupAdLabelRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupAdLabel>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAdLabelService/GetAdGroupAdLabel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates and removes ad group ad labels."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LabelError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_ad_group_ad_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupAdLabelsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupAdLabelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAdLabelService/MutateAdGroupAdLabels",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupAdRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupAdOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupAdOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "5")]
pub policy_validation_parameter:
::core::option::Option<super::common::PolicyValidationParameter>,
#[prost(oneof = "ad_group_ad_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_ad_operation::Operation>,
}
pub mod ad_group_ad_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupAd),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroupAd),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupAdResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAdResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group_ad: ::core::option::Option<super::resources::AdGroupAd>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_ad_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ads in an ad group."]
#[derive(Debug, Clone)]
pub struct AdGroupAdServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupAdServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupAdServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupAdServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_ad(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupAdRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupAd>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAdService/GetAdGroupAd",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ads. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdCustomizerError]()"]
#[doc = " [AdError]()"]
#[doc = " [AdGroupAdError]()"]
#[doc = " [AdSharingError]()"]
#[doc = " [AdxError]()"]
#[doc = " [AssetError]()"]
#[doc = " [AssetLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedAttributeReferenceError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [ImageError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MediaBundleError]()"]
#[doc = " [MediaFileError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [PolicyFindingError]()"]
#[doc = " [PolicyValidationParameterError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_ad_group_ads(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupAdsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupAdsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAdService/MutateAdGroupAds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupAssetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAssetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupAssetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupAssetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "ad_group_asset_operation::Operation", tags = "1, 3, 2")]
pub operation: ::core::option::Option<ad_group_asset_operation::Operation>,
}
pub mod ad_group_asset_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupAsset),
#[prost(message, tag = "3")]
Update(super::super::resources::AdGroupAsset),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAssetsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupAssetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupAssetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_asset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group assets."]
#[derive(Debug, Clone)]
pub struct AdGroupAssetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupAssetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupAssetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupAssetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group asset in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_asset(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupAssetRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupAsset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAssetService/GetAdGroupAsset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad group assets. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AssetLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ContextError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_ad_group_assets(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupAssetsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupAssetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupAssetService/MutateAdGroupAssets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupAudienceViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_audience_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group audience views."]
#[derive(Debug, Clone)]
pub struct AdGroupAudienceViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupAudienceViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupAudienceViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupAudienceViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group audience view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_audience_view(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupAudienceViewRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupAudienceView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupAudienceViewService/GetAdGroupAudienceView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupBidModifierRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupBidModifiersRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupBidModifierOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupBidModifierOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "ad_group_bid_modifier_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_bid_modifier_operation::Operation>,
}
pub mod ad_group_bid_modifier_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupBidModifier),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroupBidModifier),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupBidModifiersResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupBidModifierResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupBidModifierResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group_bid_modifier: ::core::option::Option<super::resources::AdGroupBidModifier>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_bid_modifier_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group bid modifiers."]
#[derive(Debug, Clone)]
pub struct AdGroupBidModifierServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupBidModifierServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupBidModifierServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupBidModifierServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group bid modifier in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_bid_modifier(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupBidModifierRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupBidModifier>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupBidModifierService/GetAdGroupBidModifier",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad group bid modifiers."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdGroupBidModifierError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ContextError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_ad_group_bid_modifiers(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupBidModifiersRequest>,
) -> Result<tonic::Response<super::MutateAdGroupBidModifiersResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupBidModifierService/MutateAdGroupBidModifiers") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupCriterionLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriterionLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupCriterionLabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupCriterionLabelOperation {
#[prost(oneof = "ad_group_criterion_label_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<ad_group_criterion_label_operation::Operation>,
}
pub mod ad_group_criterion_label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupCriterionLabel),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriterionLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupCriterionLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriterionLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_criterion_label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels on ad group criteria."]
#[derive(Debug, Clone)]
pub struct AdGroupCriterionLabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupCriterionLabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupCriterionLabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupCriterionLabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group criterion label in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_criterion_label(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupCriterionLabelRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupCriterionLabel>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupCriterionLabelService/GetAdGroupCriterionLabel") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates and removes ad group criterion labels."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_ad_group_criterion_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupCriterionLabelsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupCriterionLabelsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupCriterionLabelService/MutateAdGroupCriterionLabels") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupCriterionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriteriaRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupCriterionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupCriterionOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, repeated, tag = "5")]
pub exempt_policy_violation_keys: ::prost::alloc::vec::Vec<super::common::PolicyViolationKey>,
#[prost(oneof = "ad_group_criterion_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_criterion_operation::Operation>,
}
pub mod ad_group_criterion_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupCriterion),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroupCriterion),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriteriaResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupCriterionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupCriterionResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group_criterion: ::core::option::Option<super::resources::AdGroupCriterion>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_criterion_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group criteria."]
#[derive(Debug, Clone)]
pub struct AdGroupCriterionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupCriterionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupCriterionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupCriterionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested criterion in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_criterion(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupCriterionRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupCriterion>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupCriterionService/GetAdGroupCriterion",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes criteria. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdGroupCriterionError]()"]
#[doc = " [AdxError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BiddingError]()"]
#[doc = " [BiddingStrategyError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [ContextError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MultiplierError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_ad_group_criteria(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupCriteriaRequest>,
) -> Result<tonic::Response<super::MutateAdGroupCriteriaResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupCriterionService/MutateAdGroupCriteria",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupCriterionSimulationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_criterion_simulation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch ad group criterion simulations."]
#[derive(Debug, Clone)]
pub struct AdGroupCriterionSimulationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupCriterionSimulationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupCriterionSimulationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupCriterionSimulationServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group criterion simulation in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_criterion_simulation(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupCriterionSimulationRequest>,
) -> Result<
tonic::Response<super::super::resources::AdGroupCriterionSimulation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupCriterionSimulationService/GetAdGroupCriterionSimulation") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupExtensionSettingRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupExtensionSettingsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupExtensionSettingOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupExtensionSettingOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
#[prost(oneof = "ad_group_extension_setting_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_extension_setting_operation::Operation>,
}
pub mod ad_group_extension_setting_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupExtensionSetting),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroupExtensionSetting),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupExtensionSettingsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupExtensionSettingResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupExtensionSettingResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group_extension_setting:
::core::option::Option<super::resources::AdGroupExtensionSetting>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_extension_setting_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group extension settings."]
#[derive(Debug, Clone)]
pub struct AdGroupExtensionSettingServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupExtensionSettingServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupExtensionSettingServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupExtensionSettingServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group extension setting in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_extension_setting(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupExtensionSettingRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupExtensionSetting>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupExtensionSettingService/GetAdGroupExtensionSetting") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad group extension settings. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [ExtensionSettingError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_ad_group_extension_settings(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupExtensionSettingsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupExtensionSettingsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.AdGroupExtensionSettingService/MutateAdGroupExtensionSettings") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupFeedRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupFeedsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupFeedOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupFeedOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "ad_group_feed_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_feed_operation::Operation>,
}
pub mod ad_group_feed_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupFeed),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroupFeed),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupFeedsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupFeedResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupFeedResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group_feed: ::core::option::Option<super::resources::AdGroupFeed>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_feed_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad group feeds."]
#[derive(Debug, Clone)]
pub struct AdGroupFeedServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupFeedServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupFeedServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupFeedServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group feed in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_feed(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupFeedRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupFeed>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupFeedService/GetAdGroupFeed",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad group feeds. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdGroupFeedError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_ad_group_feeds(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupFeedsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupFeedsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupFeedService/MutateAdGroupFeeds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupLabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupLabelOperation {
#[prost(oneof = "ad_group_label_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<ad_group_label_operation::Operation>,
}
pub mod ad_group_label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroupLabel),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels on ad groups."]
#[derive(Debug, Clone)]
pub struct AdGroupLabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupLabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupLabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupLabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group label in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_label(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupLabelRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupLabel>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupLabelService/GetAdGroupLabel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates and removes ad group labels."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LabelError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_ad_group_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupLabelsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupLabelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupLabelService/MutateAdGroupLabels",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdGroupOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdGroupOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "ad_group_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_group_operation::Operation>,
}
pub mod ad_group_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdGroup),
#[prost(message, tag = "2")]
Update(super::super::resources::AdGroup),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdGroupResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdGroupResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_group: ::core::option::Option<super::resources::AdGroup>,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad groups."]
#[derive(Debug, Clone)]
pub struct AdGroupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroup>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupService/GetAdGroup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad groups. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdGroupError]()"]
#[doc = " [AdxError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BiddingError]()"]
#[doc = " [BiddingStrategyError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MultiplierError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SettingError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_ad_groups(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdGroupsRequest>,
) -> Result<tonic::Response<super::MutateAdGroupsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupService/MutateAdGroups",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdGroupSimulationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_group_simulation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch ad group simulations."]
#[derive(Debug, Clone)]
pub struct AdGroupSimulationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdGroupSimulationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdGroupSimulationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdGroupSimulationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad group simulation in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_group_simulation(
&mut self,
request: impl tonic::IntoRequest<super::GetAdGroupSimulationRequest>,
) -> Result<tonic::Response<super::super::resources::AdGroupSimulation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdGroupSimulationService/GetAdGroupSimulation",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdParameterRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdParametersRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdParameterOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdParameterOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "ad_parameter_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<ad_parameter_operation::Operation>,
}
pub mod ad_parameter_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::AdParameter),
#[prost(message, tag = "2")]
Update(super::super::resources::AdParameter),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdParametersResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdParameterResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdParameterResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad_parameter: ::core::option::Option<super::resources::AdParameter>,
}
#[doc = r" Generated client implementations."]
pub mod ad_parameter_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ad parameters."]
#[derive(Debug, Clone)]
pub struct AdParameterServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdParameterServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdParameterServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdParameterServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad parameter in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_parameter(
&mut self,
request: impl tonic::IntoRequest<super::GetAdParameterRequest>,
) -> Result<tonic::Response<super::super::resources::AdParameter>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdParameterService/GetAdParameter",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes ad parameters. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdParameterError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_ad_parameters(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdParametersRequest>,
) -> Result<tonic::Response<super::MutateAdParametersResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdParameterService/MutateAdParameters",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdScheduleViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod ad_schedule_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch ad schedule views."]
#[derive(Debug, Clone)]
pub struct AdScheduleViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdScheduleViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdScheduleViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdScheduleViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad schedule view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad_schedule_view(
&mut self,
request: impl tonic::IntoRequest<super::GetAdScheduleViewRequest>,
) -> Result<tonic::Response<super::super::resources::AdScheduleView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdScheduleViewService/GetAdScheduleView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAdRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AdOperation>,
#[prost(bool, tag = "4")]
pub partial_failure: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdOperation {
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub policy_validation_parameter:
::core::option::Option<super::common::PolicyValidationParameter>,
#[prost(oneof = "ad_operation::Operation", tags = "1")]
pub operation: ::core::option::Option<ad_operation::Operation>,
}
pub mod ad_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Update(super::super::resources::Ad),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAdResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAdResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ad: ::core::option::Option<super::resources::Ad>,
}
#[doc = r" Generated client implementations."]
pub mod ad_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage ads."]
#[derive(Debug, Clone)]
pub struct AdServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AdServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AdServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AdServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested ad in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_ad(
&mut self,
request: impl tonic::IntoRequest<super::GetAdRequest>,
) -> Result<tonic::Response<super::super::resources::Ad>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdService/GetAd",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates ads. Operation statuses are returned. Updating ads is not supported"]
#[doc = " for TextAd, ExpandedDynamicSearchAd, GmailAd and ImageAd."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdCustomizerError]()"]
#[doc = " [AdError]()"]
#[doc = " [AdSharingError]()"]
#[doc = " [AdxError]()"]
#[doc = " [AssetError]()"]
#[doc = " [AssetLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedAttributeReferenceError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [ImageError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MediaBundleError]()"]
#[doc = " [MediaFileError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [PolicyFindingError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_ads(
&mut self,
request: impl tonic::IntoRequest<super::MutateAdsRequest>,
) -> Result<tonic::Response<super::MutateAdsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AdService/MutateAds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAgeRangeViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod age_range_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage age range views."]
#[derive(Debug, Clone)]
pub struct AgeRangeViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AgeRangeViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AgeRangeViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AgeRangeViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested age range view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_age_range_view(
&mut self,
request: impl tonic::IntoRequest<super::GetAgeRangeViewRequest>,
) -> Result<tonic::Response<super::super::resources::AgeRangeView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AgeRangeViewService/GetAgeRangeView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAssetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAssetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<AssetOperation>,
#[prost(bool, tag = "5")]
pub partial_failure: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "3"
)]
pub response_content_type: i32,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "asset_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<asset_operation::Operation>,
}
pub mod asset_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::Asset),
#[prost(message, tag = "2")]
Update(super::super::resources::Asset),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAssetsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateAssetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateAssetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub asset: ::core::option::Option<super::resources::Asset>,
}
#[doc = r" Generated client implementations."]
pub mod asset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage assets. Asset types can be created with AssetService are"]
#[doc = " YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be"]
#[doc = " created with Ad inline."]
#[derive(Debug, Clone)]
pub struct AssetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AssetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AssetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AssetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested asset in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_asset(
&mut self,
request: impl tonic::IntoRequest<super::GetAssetRequest>,
) -> Result<tonic::Response<super::super::resources::Asset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AssetService/GetAsset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates assets. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AssetError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CurrencyCodeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MediaUploadError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
#[doc = " [YoutubeVideoRegistrationError]()"]
pub async fn mutate_assets(
&mut self,
request: impl tonic::IntoRequest<super::MutateAssetsRequest>,
) -> Result<tonic::Response<super::MutateAssetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.AssetService/MutateAssets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBiddingStrategyRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBiddingStrategiesRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<BiddingStrategyOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BiddingStrategyOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "bidding_strategy_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<bidding_strategy_operation::Operation>,
}
pub mod bidding_strategy_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::BiddingStrategy),
#[prost(message, tag = "2")]
Update(super::super::resources::BiddingStrategy),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBiddingStrategiesResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateBiddingStrategyResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBiddingStrategyResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub bidding_strategy: ::core::option::Option<super::resources::BiddingStrategy>,
}
#[doc = r" Generated client implementations."]
pub mod bidding_strategy_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage bidding strategies."]
#[derive(Debug, Clone)]
pub struct BiddingStrategyServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> BiddingStrategyServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BiddingStrategyServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
BiddingStrategyServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested bidding strategy in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_bidding_strategy(
&mut self,
request: impl tonic::IntoRequest<super::GetBiddingStrategyRequest>,
) -> Result<tonic::Response<super::super::resources::BiddingStrategy>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BiddingStrategyService/GetBiddingStrategy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes bidding strategies. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdxError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BiddingError]()"]
#[doc = " [BiddingStrategyError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_bidding_strategies(
&mut self,
request: impl tonic::IntoRequest<super::MutateBiddingStrategiesRequest>,
) -> Result<tonic::Response<super::MutateBiddingStrategiesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BiddingStrategyService/MutateBiddingStrategies",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignAssetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignAssetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignAssetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignAssetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_asset_operation::Operation", tags = "1, 3, 2")]
pub operation: ::core::option::Option<campaign_asset_operation::Operation>,
}
pub mod campaign_asset_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignAsset),
#[prost(message, tag = "3")]
Update(super::super::resources::CampaignAsset),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignAssetsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignAssetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignAssetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_asset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign assets."]
#[derive(Debug, Clone)]
pub struct CampaignAssetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignAssetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignAssetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignAssetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign asset in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_asset(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignAssetRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignAsset>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignAssetService/GetCampaignAsset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign assets. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AssetLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_campaign_assets(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignAssetsRequest>,
) -> Result<tonic::Response<super::MutateCampaignAssetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignAssetService/MutateCampaignAssets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignBidModifierRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBidModifiersRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignBidModifierOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignBidModifierOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_bid_modifier_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_bid_modifier_operation::Operation>,
}
pub mod campaign_bid_modifier_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignBidModifier),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignBidModifier),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBidModifiersResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignBidModifierResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBidModifierResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_bid_modifier: ::core::option::Option<super::resources::CampaignBidModifier>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_bid_modifier_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign bid modifiers."]
#[derive(Debug, Clone)]
pub struct CampaignBidModifierServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignBidModifierServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignBidModifierServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignBidModifierServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign bid modifier in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_bid_modifier(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignBidModifierRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignBidModifier>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignBidModifierService/GetCampaignBidModifier") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign bid modifiers."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ContextError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_campaign_bid_modifiers(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignBidModifiersRequest>,
) -> Result<tonic::Response<super::MutateCampaignBidModifiersResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignBidModifierService/MutateCampaignBidModifiers") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignBudgetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBudgetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignBudgetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignBudgetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_budget_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_budget_operation::Operation>,
}
pub mod campaign_budget_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignBudget),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignBudget),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBudgetsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignBudgetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignBudgetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_budget: ::core::option::Option<super::resources::CampaignBudget>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_budget_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign budgets."]
#[derive(Debug, Clone)]
pub struct CampaignBudgetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignBudgetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignBudgetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignBudgetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Campaign Budget in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_budget(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignBudgetRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignBudget>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignBudgetService/GetCampaignBudget",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign budgets. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignBudgetError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_campaign_budgets(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignBudgetsRequest>,
) -> Result<tonic::Response<super::MutateCampaignBudgetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignBudgetService/MutateCampaignBudgets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignCriterionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignCriteriaRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignCriterionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignCriterionOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_criterion_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_criterion_operation::Operation>,
}
pub mod campaign_criterion_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignCriterion),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignCriterion),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignCriteriaResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignCriterionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignCriterionResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_criterion: ::core::option::Option<super::resources::CampaignCriterion>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_criterion_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign criteria."]
#[derive(Debug, Clone)]
pub struct CampaignCriterionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignCriterionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignCriterionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignCriterionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested criterion in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_criterion(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignCriterionRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignCriterion>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignCriterionService/GetCampaignCriterion",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes criteria. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdxError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignCriterionError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [ContextError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RegionCodeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_campaign_criteria(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignCriteriaRequest>,
) -> Result<tonic::Response<super::MutateCampaignCriteriaResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignCriterionService/MutateCampaignCriteria",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignDraftRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignDraftsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignDraftOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PromoteCampaignDraftRequest {
#[prost(string, tag = "1")]
pub campaign_draft: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignDraftOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_draft_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_draft_operation::Operation>,
}
pub mod campaign_draft_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignDraft),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignDraft),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignDraftsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignDraftResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignDraftResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_draft: ::core::option::Option<super::resources::CampaignDraft>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCampaignDraftAsyncErrorsRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCampaignDraftAsyncErrorsResponse {
#[prost(message, repeated, tag = "1")]
pub errors: ::prost::alloc::vec::Vec<super::super::super::super::rpc::Status>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_draft_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign drafts."]
#[derive(Debug, Clone)]
pub struct CampaignDraftServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignDraftServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignDraftServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignDraftServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign draft in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_draft(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignDraftRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignDraft>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignDraftService/GetCampaignDraft",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign drafts. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignDraftError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_campaign_drafts(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignDraftsRequest>,
) -> Result<tonic::Response<super::MutateCampaignDraftsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignDraftService/MutateCampaignDrafts",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Promotes the changes in a draft back to the base campaign."]
#[doc = ""]
#[doc = " This method returns a Long Running Operation (LRO) indicating if the"]
#[doc = " Promote is done. Use [Operations.GetOperation] to poll the LRO until it"]
#[doc = " is done. Only a done status is returned in the response. See the status"]
#[doc = " in the Campaign Draft resource to determine if the promotion was"]
#[doc = " successful. If the LRO failed, use"]
#[doc = " [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v7.services.CampaignDraftService.ListCampaignDraftAsyncErrors] to view the list of"]
#[doc = " error reasons."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignDraftError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn promote_campaign_draft(
&mut self,
request: impl tonic::IntoRequest<super::PromoteCampaignDraftRequest>,
) -> Result<
tonic::Response<super::super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignDraftService/PromoteCampaignDraft",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns all errors that occurred during CampaignDraft promote. Throws an"]
#[doc = " error if called before campaign draft is promoted."]
#[doc = " Supports standard list paging."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_campaign_draft_async_errors(
&mut self,
request: impl tonic::IntoRequest<super::ListCampaignDraftAsyncErrorsRequest>,
) -> Result<tonic::Response<super::ListCampaignDraftAsyncErrorsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignDraftService/ListCampaignDraftAsyncErrors") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignExperimentRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExperimentsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignExperimentOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignExperimentOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_experiment_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<campaign_experiment_operation::Operation>,
}
pub mod campaign_experiment_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Update(super::super::resources::CampaignExperiment),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExperimentsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignExperimentResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExperimentResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_experiment: ::core::option::Option<super::resources::CampaignExperiment>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCampaignExperimentRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_experiment: ::core::option::Option<super::resources::CampaignExperiment>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCampaignExperimentMetadata {
#[prost(string, tag = "1")]
pub campaign_experiment: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraduateCampaignExperimentRequest {
#[prost(string, tag = "1")]
pub campaign_experiment: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub campaign_budget: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraduateCampaignExperimentResponse {
#[prost(string, tag = "1")]
pub graduated_campaign: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PromoteCampaignExperimentRequest {
#[prost(string, tag = "1")]
pub campaign_experiment: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EndCampaignExperimentRequest {
#[prost(string, tag = "1")]
pub campaign_experiment: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCampaignExperimentAsyncErrorsRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCampaignExperimentAsyncErrorsResponse {
#[prost(message, repeated, tag = "1")]
pub errors: ::prost::alloc::vec::Vec<super::super::super::super::rpc::Status>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_experiment_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " CampaignExperimentService manages the life cycle of campaign experiments."]
#[doc = " It is used to create new experiments from drafts, modify experiment"]
#[doc = " properties, promote changes in an experiment back to its base campaign,"]
#[doc = " graduate experiments into new stand-alone campaigns, and to remove an"]
#[doc = " experiment."]
#[doc = ""]
#[doc = " An experiment consists of two variants or arms - the base campaign and the"]
#[doc = " experiment campaign, directing a fixed share of traffic to each arm."]
#[doc = " A campaign experiment is created from a draft of changes to the base campaign"]
#[doc = " and will be a snapshot of changes in the draft at the time of creation."]
#[derive(Debug, Clone)]
pub struct CampaignExperimentServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignExperimentServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignExperimentServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignExperimentServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign experiment in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_experiment(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignExperimentRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignExperiment>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignExperimentService/GetCampaignExperiment",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a campaign experiment based on a campaign draft. The draft campaign"]
#[doc = " will be forked into a real campaign (called the experiment campaign) that"]
#[doc = " will begin serving ads if successfully created."]
#[doc = ""]
#[doc = " The campaign experiment is created immediately with status INITIALIZING."]
#[doc = " This method return a long running operation that tracks the forking of the"]
#[doc = " draft campaign. If the forking fails, a list of errors can be retrieved"]
#[doc = " using the ListCampaignExperimentAsyncErrors method. The operation's"]
#[doc = " metadata will be a StringValue containing the resource name of the created"]
#[doc = " campaign experiment."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignExperimentError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DateRangeError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
pub async fn create_campaign_experiment(
&mut self,
request: impl tonic::IntoRequest<super::CreateCampaignExperimentRequest>,
) -> Result<
tonic::Response<super::super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExperimentService/CreateCampaignExperiment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates campaign experiments. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignExperimentError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_campaign_experiments(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignExperimentsRequest>,
) -> Result<tonic::Response<super::MutateCampaignExperimentsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExperimentService/MutateCampaignExperiments") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Graduates a campaign experiment to a full campaign. The base and experiment"]
#[doc = " campaigns will start running independently with their own budgets."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignExperimentError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn graduate_campaign_experiment(
&mut self,
request: impl tonic::IntoRequest<super::GraduateCampaignExperimentRequest>,
) -> Result<tonic::Response<super::GraduateCampaignExperimentResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExperimentService/GraduateCampaignExperiment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Promotes the changes in a experiment campaign back to the base campaign."]
#[doc = ""]
#[doc = " The campaign experiment is updated immediately with status PROMOTING."]
#[doc = " This method return a long running operation that tracks the promoting of"]
#[doc = " the experiment campaign. If the promoting fails, a list of errors can be"]
#[doc = " retrieved using the ListCampaignExperimentAsyncErrors method."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn promote_campaign_experiment(
&mut self,
request: impl tonic::IntoRequest<super::PromoteCampaignExperimentRequest>,
) -> Result<
tonic::Response<super::super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExperimentService/PromoteCampaignExperiment") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Immediately ends a campaign experiment, changing the experiment's scheduled"]
#[doc = " end date and without waiting for end of day. End date is updated to be the"]
#[doc = " time of the request."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignExperimentError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn end_campaign_experiment(
&mut self,
request: impl tonic::IntoRequest<super::EndCampaignExperimentRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignExperimentService/EndCampaignExperiment",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns all errors that occurred during CampaignExperiment create or"]
#[doc = " promote (whichever occurred last)."]
#[doc = " Supports standard list paging."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_campaign_experiment_async_errors(
&mut self,
request: impl tonic::IntoRequest<super::ListCampaignExperimentAsyncErrorsRequest>,
) -> Result<tonic::Response<super::ListCampaignExperimentAsyncErrorsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExperimentService/ListCampaignExperimentAsyncErrors") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignExtensionSettingRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExtensionSettingsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignExtensionSettingOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignExtensionSettingOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_extension_setting_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_extension_setting_operation::Operation>,
}
pub mod campaign_extension_setting_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignExtensionSetting),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignExtensionSetting),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExtensionSettingsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignExtensionSettingResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignExtensionSettingResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_extension_setting:
::core::option::Option<super::resources::CampaignExtensionSetting>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_extension_setting_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign extension settings."]
#[derive(Debug, Clone)]
pub struct CampaignExtensionSettingServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignExtensionSettingServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignExtensionSettingServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignExtensionSettingServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign extension setting in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_extension_setting(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignExtensionSettingRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignExtensionSetting>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExtensionSettingService/GetCampaignExtensionSetting") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign extension settings. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [ExtensionSettingError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_campaign_extension_settings(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignExtensionSettingsRequest>,
) -> Result<tonic::Response<super::MutateCampaignExtensionSettingsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignExtensionSettingService/MutateCampaignExtensionSettings") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignFeedRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignFeedsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignFeedOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignFeedOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_feed_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_feed_operation::Operation>,
}
pub mod campaign_feed_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignFeed),
#[prost(message, tag = "2")]
Update(super::super::resources::CampaignFeed),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignFeedsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignFeedResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignFeedResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_feed: ::core::option::Option<super::resources::CampaignFeed>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_feed_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign feeds."]
#[derive(Debug, Clone)]
pub struct CampaignFeedServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignFeedServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignFeedServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignFeedServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign feed in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_feed(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignFeedRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignFeed>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignFeedService/GetCampaignFeed",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaign feeds. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignFeedError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_campaign_feeds(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignFeedsRequest>,
) -> Result<tonic::Response<super::MutateCampaignFeedsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignFeedService/MutateCampaignFeeds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignLabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignLabelOperation {
#[prost(oneof = "campaign_label_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<campaign_label_operation::Operation>,
}
pub mod campaign_label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignLabel),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels on campaigns."]
#[derive(Debug, Clone)]
pub struct CampaignLabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignLabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignLabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignLabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign-label relationship in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_label(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignLabelRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignLabel>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignLabelService/GetCampaignLabel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates and removes campaign-label relationships."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LabelError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_campaign_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignLabelsRequest>,
) -> Result<tonic::Response<super::MutateCampaignLabelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignLabelService/MutateCampaignLabels",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "campaign_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<campaign_operation::Operation>,
}
pub mod campaign_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::Campaign),
#[prost(message, tag = "2")]
Update(super::super::resources::Campaign),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign: ::core::option::Option<super::resources::Campaign>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaigns."]
#[derive(Debug, Clone)]
pub struct CampaignServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignRequest>,
) -> Result<tonic::Response<super::super::resources::Campaign>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignService/GetCampaign",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes campaigns. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdxError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BiddingError]()"]
#[doc = " [BiddingStrategyError]()"]
#[doc = " [CampaignBudgetError]()"]
#[doc = " [CampaignError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DateRangeError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RegionCodeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SettingError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_campaigns(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignsRequest>,
) -> Result<tonic::Response<super::MutateCampaignsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignService/MutateCampaigns",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignSharedSetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignSharedSetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CampaignSharedSetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignSharedSetOperation {
#[prost(oneof = "campaign_shared_set_operation::Operation", tags = "1, 3")]
pub operation: ::core::option::Option<campaign_shared_set_operation::Operation>,
}
pub mod campaign_shared_set_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CampaignSharedSet),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignSharedSetsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCampaignSharedSetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCampaignSharedSetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub campaign_shared_set: ::core::option::Option<super::resources::CampaignSharedSet>,
}
#[doc = r" Generated client implementations."]
pub mod campaign_shared_set_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign shared sets."]
#[derive(Debug, Clone)]
pub struct CampaignSharedSetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignSharedSetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignSharedSetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignSharedSetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign shared set in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_shared_set(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignSharedSetRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignSharedSet>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignSharedSetService/GetCampaignSharedSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes campaign shared sets. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CampaignSharedSetError]()"]
#[doc = " [ContextError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_campaign_shared_sets(
&mut self,
request: impl tonic::IntoRequest<super::MutateCampaignSharedSetsRequest>,
) -> Result<tonic::Response<super::MutateCampaignSharedSetsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignSharedSetService/MutateCampaignSharedSets") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversionActionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionActionsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<ConversionActionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionActionOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "conversion_action_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<conversion_action_operation::Operation>,
}
pub mod conversion_action_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::ConversionAction),
#[prost(message, tag = "2")]
Update(super::super::resources::ConversionAction),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionActionsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateConversionActionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionActionResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub conversion_action: ::core::option::Option<super::resources::ConversionAction>,
}
#[doc = r" Generated client implementations."]
pub mod conversion_action_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage conversion actions."]
#[derive(Debug, Clone)]
pub struct ConversionActionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ConversionActionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ConversionActionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ConversionActionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested conversion action."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_conversion_action(
&mut self,
request: impl tonic::IntoRequest<super::GetConversionActionRequest>,
) -> Result<tonic::Response<super::super::resources::ConversionAction>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ConversionActionService/GetConversionAction",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates or removes conversion actions. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ConversionActionError]()"]
#[doc = " [CurrencyCodeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_conversion_actions(
&mut self,
request: impl tonic::IntoRequest<super::MutateConversionActionsRequest>,
) -> Result<tonic::Response<super::MutateConversionActionsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ConversionActionService/MutateConversionActions",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversionCustomVariableRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionCustomVariablesRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<ConversionCustomVariableOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionCustomVariableOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "conversion_custom_variable_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<conversion_custom_variable_operation::Operation>,
}
pub mod conversion_custom_variable_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::ConversionCustomVariable),
#[prost(message, tag = "2")]
Update(super::super::resources::ConversionCustomVariable),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionCustomVariablesResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateConversionCustomVariableResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateConversionCustomVariableResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub conversion_custom_variable:
::core::option::Option<super::resources::ConversionCustomVariable>,
}
#[doc = r" Generated client implementations."]
pub mod conversion_custom_variable_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage conversion custom variables."]
#[derive(Debug, Clone)]
pub struct ConversionCustomVariableServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ConversionCustomVariableServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ConversionCustomVariableServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ConversionCustomVariableServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested conversion custom variable."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_conversion_custom_variable(
&mut self,
request: impl tonic::IntoRequest<super::GetConversionCustomVariableRequest>,
) -> Result<tonic::Response<super::super::resources::ConversionCustomVariable>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ConversionCustomVariableService/GetConversionCustomVariable") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates conversion custom variables. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ConversionCustomVariableError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_conversion_custom_variables(
&mut self,
request: impl tonic::IntoRequest<super::MutateConversionCustomVariablesRequest>,
) -> Result<tonic::Response<super::MutateConversionCustomVariablesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ConversionCustomVariableService/MutateConversionCustomVariables") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerAssetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerAssetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerAssetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerAssetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_asset_operation::Operation", tags = "1, 3, 2")]
pub operation: ::core::option::Option<customer_asset_operation::Operation>,
}
pub mod customer_asset_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerAsset),
#[prost(message, tag = "3")]
Update(super::super::resources::CustomerAsset),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerAssetsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerAssetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerAssetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_asset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer assets."]
#[derive(Debug, Clone)]
pub struct CustomerAssetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerAssetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerAssetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerAssetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested customer asset in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_asset(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerAssetRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerAsset>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerAssetService/GetCustomerAsset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes customer assets. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AssetLinkError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_assets(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerAssetsRequest>,
) -> Result<tonic::Response<super::MutateCustomerAssetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerAssetService/MutateCustomerAssets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerExtensionSettingRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerExtensionSettingsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerExtensionSettingOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerExtensionSettingOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_extension_setting_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<customer_extension_setting_operation::Operation>,
}
pub mod customer_extension_setting_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerExtensionSetting),
#[prost(message, tag = "2")]
Update(super::super::resources::CustomerExtensionSetting),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerExtensionSettingsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerExtensionSettingResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerExtensionSettingResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub customer_extension_setting:
::core::option::Option<super::resources::CustomerExtensionSetting>,
}
#[doc = r" Generated client implementations."]
pub mod customer_extension_setting_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer extension settings."]
#[derive(Debug, Clone)]
pub struct CustomerExtensionSettingServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerExtensionSettingServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerExtensionSettingServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerExtensionSettingServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested customer extension setting in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_extension_setting(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerExtensionSettingRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerExtensionSetting>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerExtensionSettingService/GetCustomerExtensionSetting") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes customer extension settings. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [ExtensionSettingError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_customer_extension_settings(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerExtensionSettingsRequest>,
) -> Result<tonic::Response<super::MutateCustomerExtensionSettingsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerExtensionSettingService/MutateCustomerExtensionSettings") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerFeedRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerFeedsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerFeedOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerFeedOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_feed_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<customer_feed_operation::Operation>,
}
pub mod customer_feed_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerFeed),
#[prost(message, tag = "2")]
Update(super::super::resources::CustomerFeed),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerFeedsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerFeedResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerFeedResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub customer_feed: ::core::option::Option<super::resources::CustomerFeed>,
}
#[doc = r" Generated client implementations."]
pub mod customer_feed_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer feeds."]
#[derive(Debug, Clone)]
pub struct CustomerFeedServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerFeedServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerFeedServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerFeedServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested customer feed in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_feed(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerFeedRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerFeed>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerFeedService/GetCustomerFeed",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes customer feeds. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CustomerFeedError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [FunctionError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_customer_feeds(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerFeedsRequest>,
) -> Result<tonic::Response<super::MutateCustomerFeedsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerFeedService/MutateCustomerFeeds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerLabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerLabelOperation {
#[prost(oneof = "customer_label_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<customer_label_operation::Operation>,
}
pub mod customer_label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerLabel),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels on customers."]
#[derive(Debug, Clone)]
pub struct CustomerLabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerLabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerLabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerLabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested customer-label relationship in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_label(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerLabelRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerLabel>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerLabelService/GetCustomerLabel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates and removes customer-label relationships."]
#[doc = " Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LabelError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerLabelsRequest>,
) -> Result<tonic::Response<super::MutateCustomerLabelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerLabelService/MutateCustomerLabels",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerNegativeCriterionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerNegativeCriteriaRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerNegativeCriterionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerNegativeCriterionOperation {
#[prost(oneof = "customer_negative_criterion_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<customer_negative_criterion_operation::Operation>,
}
pub mod customer_negative_criterion_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerNegativeCriterion),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerNegativeCriteriaResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerNegativeCriteriaResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerNegativeCriteriaResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub customer_negative_criterion:
::core::option::Option<super::resources::CustomerNegativeCriterion>,
}
#[doc = r" Generated client implementations."]
pub mod customer_negative_criterion_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer negative criteria."]
#[derive(Debug, Clone)]
pub struct CustomerNegativeCriterionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerNegativeCriterionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerNegativeCriterionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerNegativeCriterionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested criterion in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_negative_criterion(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerNegativeCriterionRequest>,
) -> Result<
tonic::Response<super::super::resources::CustomerNegativeCriterion>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerNegativeCriterionService/GetCustomerNegativeCriterion") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes criteria. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_negative_criteria(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerNegativeCriteriaRequest>,
) -> Result<tonic::Response<super::MutateCustomerNegativeCriteriaResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerNegativeCriterionService/MutateCustomerNegativeCriteria") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub operation: ::core::option::Option<CustomerOperation>,
#[prost(bool, tag = "5")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "6"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCustomerClientRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub customer_client: ::core::option::Option<super::resources::Customer>,
#[prost(string, optional, tag = "5")]
pub email_address: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "super::enums::access_role_enum::AccessRole", tag = "4")]
pub access_role: i32,
#[prost(bool, tag = "6")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerOperation {
#[prost(message, optional, tag = "1")]
pub update: ::core::option::Option<super::resources::Customer>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCustomerClientResponse {
#[prost(string, tag = "2")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub invitation_link: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerResponse {
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<MutateCustomerResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub customer: ::core::option::Option<super::resources::Customer>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccessibleCustomersRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccessibleCustomersResponse {
#[prost(string, repeated, tag = "1")]
pub resource_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[doc = r" Generated client implementations."]
pub mod customer_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customers."]
#[derive(Debug, Clone)]
pub struct CustomerServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested customer in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerRequest>,
) -> Result<tonic::Response<super::super::resources::Customer>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerService/GetCustomer",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a customer. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_customer(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerRequest>,
) -> Result<tonic::Response<super::MutateCustomerResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerService/MutateCustomer",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns resource names of customers directly accessible by the"]
#[doc = " user authenticating the call."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_accessible_customers(
&mut self,
request: impl tonic::IntoRequest<super::ListAccessibleCustomersRequest>,
) -> Result<tonic::Response<super::ListAccessibleCustomersResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerService/ListAccessibleCustomers",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new client under manager. The new client customer is returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AccessInvitationError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CurrencyCodeError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ManagerLinkError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [TimeZoneError]()"]
pub async fn create_customer_client(
&mut self,
request: impl tonic::IntoRequest<super::CreateCustomerClientRequest>,
) -> Result<tonic::Response<super::CreateCustomerClientResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerService/CreateCustomerClient",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetExtensionFeedItemRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateExtensionFeedItemsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<ExtensionFeedItemOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtensionFeedItemOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "extension_feed_item_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<extension_feed_item_operation::Operation>,
}
pub mod extension_feed_item_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::ExtensionFeedItem),
#[prost(message, tag = "2")]
Update(super::super::resources::ExtensionFeedItem),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateExtensionFeedItemsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateExtensionFeedItemResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateExtensionFeedItemResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub extension_feed_item: ::core::option::Option<super::resources::ExtensionFeedItem>,
}
#[doc = r" Generated client implementations."]
pub mod extension_feed_item_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage extension feed items."]
#[derive(Debug, Clone)]
pub struct ExtensionFeedItemServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ExtensionFeedItemServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ExtensionFeedItemServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ExtensionFeedItemServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested extension feed item in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_extension_feed_item(
&mut self,
request: impl tonic::IntoRequest<super::GetExtensionFeedItemRequest>,
) -> Result<tonic::Response<super::super::resources::ExtensionFeedItem>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ExtensionFeedItemService/GetExtensionFeedItem",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes extension feed items. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CountryCodeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [ExtensionFeedItemError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [ImageError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LanguageCodeError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_extension_feed_items(
&mut self,
request: impl tonic::IntoRequest<super::MutateExtensionFeedItemsRequest>,
) -> Result<tonic::Response<super::MutateExtensionFeedItemsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ExtensionFeedItemService/MutateExtensionFeedItems") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedItemRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedItemOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedItemOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "feed_item_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<feed_item_operation::Operation>,
}
pub mod feed_item_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::FeedItem),
#[prost(message, tag = "2")]
Update(super::super::resources::FeedItem),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateFeedItemResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub feed_item: ::core::option::Option<super::resources::FeedItem>,
}
#[doc = r" Generated client implementations."]
pub mod feed_item_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feed items."]
#[derive(Debug, Clone)]
pub struct FeedItemServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedItemServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedItemServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedItemServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed item in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_item(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedItemRequest>,
) -> Result<tonic::Response<super::super::resources::FeedItem>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemService/GetFeedItem",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes feed items. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedItemError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn mutate_feed_items(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedItemsRequest>,
) -> Result<tonic::Response<super::MutateFeedItemsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemService/MutateFeedItems",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedItemSetLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetLinksRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedItemSetLinkOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedItemSetLinkOperation {
#[prost(oneof = "feed_item_set_link_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<feed_item_set_link_operation::Operation>,
}
pub mod feed_item_set_link_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::FeedItemSetLink),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetLinksResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<MutateFeedItemSetLinkResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetLinkResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod feed_item_set_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feed item set links."]
#[derive(Debug, Clone)]
pub struct FeedItemSetLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedItemSetLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedItemSetLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedItemSetLinkServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed item set link in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_item_set_link(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedItemSetLinkRequest>,
) -> Result<tonic::Response<super::super::resources::FeedItemSetLink>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemSetLinkService/GetFeedItemSetLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes feed item set links."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_feed_item_set_links(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedItemSetLinksRequest>,
) -> Result<tonic::Response<super::MutateFeedItemSetLinksResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemSetLinkService/MutateFeedItemSetLinks",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedItemSetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedItemSetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedItemSetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "feed_item_set_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<feed_item_set_operation::Operation>,
}
pub mod feed_item_set_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::FeedItemSet),
#[prost(message, tag = "2")]
Update(super::super::resources::FeedItemSet),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<MutateFeedItemSetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemSetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod feed_item_set_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feed Item Set"]
#[derive(Debug, Clone)]
pub struct FeedItemSetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedItemSetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedItemSetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedItemSetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed item set in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_item_set(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedItemSetRequest>,
) -> Result<tonic::Response<super::super::resources::FeedItemSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemSetService/GetFeedItemSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates or removes feed item sets. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_feed_item_sets(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedItemSetsRequest>,
) -> Result<tonic::Response<super::MutateFeedItemSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemSetService/MutateFeedItemSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedItemTargetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemTargetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedItemTargetOperation>,
#[prost(bool, tag = "4")]
pub partial_failure: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedItemTargetOperation {
#[prost(oneof = "feed_item_target_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<feed_item_target_operation::Operation>,
}
pub mod feed_item_target_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::FeedItemTarget),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemTargetsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateFeedItemTargetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedItemTargetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub feed_item_target: ::core::option::Option<super::resources::FeedItemTarget>,
}
#[doc = r" Generated client implementations."]
pub mod feed_item_target_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feed item targets."]
#[derive(Debug, Clone)]
pub struct FeedItemTargetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedItemTargetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedItemTargetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedItemTargetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed item targets in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_item_target(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedItemTargetRequest>,
) -> Result<tonic::Response<super::super::resources::FeedItemTarget>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemTargetService/GetFeedItemTarget",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes feed item targets. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedItemTargetError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_feed_item_targets(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedItemTargetsRequest>,
) -> Result<tonic::Response<super::MutateFeedItemTargetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedItemTargetService/MutateFeedItemTargets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedMappingRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedMappingsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedMappingOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedMappingOperation {
#[prost(oneof = "feed_mapping_operation::Operation", tags = "1, 3")]
pub operation: ::core::option::Option<feed_mapping_operation::Operation>,
}
pub mod feed_mapping_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::FeedMapping),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedMappingsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateFeedMappingResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedMappingResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub feed_mapping: ::core::option::Option<super::resources::FeedMapping>,
}
#[doc = r" Generated client implementations."]
pub mod feed_mapping_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feed mappings."]
#[derive(Debug, Clone)]
pub struct FeedMappingServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedMappingServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedMappingServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedMappingServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed mapping in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_mapping(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedMappingRequest>,
) -> Result<tonic::Response<super::super::resources::FeedMapping>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedMappingService/GetFeedMapping",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes feed mappings. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedMappingError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_feed_mappings(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedMappingsRequest>,
) -> Result<tonic::Response<super::MutateFeedMappingsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedMappingService/MutateFeedMappings",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<FeedOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeedOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "feed_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<feed_operation::Operation>,
}
pub mod feed_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::Feed),
#[prost(message, tag = "2")]
Update(super::super::resources::Feed),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateFeedResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateFeedResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub feed: ::core::option::Option<super::resources::Feed>,
}
#[doc = r" Generated client implementations."]
pub mod feed_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage feeds."]
#[derive(Debug, Clone)]
pub struct FeedServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedRequest>,
) -> Result<tonic::Response<super::super::resources::Feed>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedService/GetFeed",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes feeds. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FeedError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_feeds(
&mut self,
request: impl tonic::IntoRequest<super::MutateFeedsRequest>,
) -> Result<tonic::Response<super::MutateFeedsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.FeedService/MutateFeeds",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordPlanAdGroupKeywordRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupKeywordsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<KeywordPlanAdGroupKeywordOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanAdGroupKeywordOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "keyword_plan_ad_group_keyword_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<keyword_plan_ad_group_keyword_operation::Operation>,
}
pub mod keyword_plan_ad_group_keyword_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::KeywordPlanAdGroupKeyword),
#[prost(message, tag = "2")]
Update(super::super::resources::KeywordPlanAdGroupKeyword),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupKeywordsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateKeywordPlanAdGroupKeywordResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupKeywordResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_ad_group_keyword_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Keyword Plan ad group keywords. KeywordPlanAdGroup is"]
#[doc = " required to add ad group keywords. Positive and negative keywords are"]
#[doc = " supported. A maximum of 10,000 positive keywords are allowed per keyword"]
#[doc = " plan. A maximum of 1,000 negative keywords are allower per keyword plan. This"]
#[doc = " includes campaign negative keywords and ad group negative keywords."]
#[derive(Debug, Clone)]
pub struct KeywordPlanAdGroupKeywordServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanAdGroupKeywordServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanAdGroupKeywordServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanAdGroupKeywordServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Keyword Plan ad group keyword in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_plan_ad_group_keyword(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordPlanAdGroupKeywordRequest>,
) -> Result<
tonic::Response<super::super::resources::KeywordPlanAdGroupKeyword>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanAdGroupKeywordService/GetKeywordPlanAdGroupKeyword") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes Keyword Plan ad group keywords. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanAdGroupKeywordError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn mutate_keyword_plan_ad_group_keywords(
&mut self,
request: impl tonic::IntoRequest<super::MutateKeywordPlanAdGroupKeywordsRequest>,
) -> Result<tonic::Response<super::MutateKeywordPlanAdGroupKeywordsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanAdGroupKeywordService/MutateKeywordPlanAdGroupKeywords") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordPlanAdGroupRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<KeywordPlanAdGroupOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanAdGroupOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "keyword_plan_ad_group_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<keyword_plan_ad_group_operation::Operation>,
}
pub mod keyword_plan_ad_group_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::KeywordPlanAdGroup),
#[prost(message, tag = "2")]
Update(super::super::resources::KeywordPlanAdGroup),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateKeywordPlanAdGroupResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanAdGroupResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_ad_group_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Keyword Plan ad groups."]
#[derive(Debug, Clone)]
pub struct KeywordPlanAdGroupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanAdGroupServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanAdGroupServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanAdGroupServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Keyword Plan ad group in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_plan_ad_group(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordPlanAdGroupRequest>,
) -> Result<tonic::Response<super::super::resources::KeywordPlanAdGroup>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanAdGroupService/GetKeywordPlanAdGroup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes Keyword Plan ad groups. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanAdGroupError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn mutate_keyword_plan_ad_groups(
&mut self,
request: impl tonic::IntoRequest<super::MutateKeywordPlanAdGroupsRequest>,
) -> Result<tonic::Response<super::MutateKeywordPlanAdGroupsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanAdGroupService/MutateKeywordPlanAdGroups") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordPlanCampaignKeywordRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignKeywordsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<KeywordPlanCampaignKeywordOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanCampaignKeywordOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "keyword_plan_campaign_keyword_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<keyword_plan_campaign_keyword_operation::Operation>,
}
pub mod keyword_plan_campaign_keyword_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::KeywordPlanCampaignKeyword),
#[prost(message, tag = "2")]
Update(super::super::resources::KeywordPlanCampaignKeyword),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignKeywordsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateKeywordPlanCampaignKeywordResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignKeywordResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_campaign_keyword_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Keyword Plan campaign keywords. KeywordPlanCampaign is"]
#[doc = " required to add the campaign keywords. Only negative keywords are supported."]
#[doc = " A maximum of 1000 negative keywords are allowed per plan. This includes both"]
#[doc = " campaign negative keywords and ad group negative keywords."]
#[derive(Debug, Clone)]
pub struct KeywordPlanCampaignKeywordServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanCampaignKeywordServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanCampaignKeywordServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanCampaignKeywordServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested plan in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_plan_campaign_keyword(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordPlanCampaignKeywordRequest>,
) -> Result<
tonic::Response<super::super::resources::KeywordPlanCampaignKeyword>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanCampaignKeywordService/GetKeywordPlanCampaignKeyword") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes Keyword Plan campaign keywords. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanAdGroupKeywordError]()"]
#[doc = " [KeywordPlanCampaignKeywordError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn mutate_keyword_plan_campaign_keywords(
&mut self,
request: impl tonic::IntoRequest<super::MutateKeywordPlanCampaignKeywordsRequest>,
) -> Result<tonic::Response<super::MutateKeywordPlanCampaignKeywordsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanCampaignKeywordService/MutateKeywordPlanCampaignKeywords") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordPlanCampaignRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<KeywordPlanCampaignOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanCampaignOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "keyword_plan_campaign_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<keyword_plan_campaign_operation::Operation>,
}
pub mod keyword_plan_campaign_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::KeywordPlanCampaign),
#[prost(message, tag = "2")]
Update(super::super::resources::KeywordPlanCampaign),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateKeywordPlanCampaignResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlanCampaignResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_campaign_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Keyword Plan campaigns."]
#[derive(Debug, Clone)]
pub struct KeywordPlanCampaignServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanCampaignServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanCampaignServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanCampaignServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Keyword Plan campaign in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_plan_campaign(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordPlanCampaignRequest>,
) -> Result<tonic::Response<super::super::resources::KeywordPlanCampaign>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanCampaignService/GetKeywordPlanCampaign") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes Keyword Plan campaigns. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanCampaignError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn mutate_keyword_plan_campaigns(
&mut self,
request: impl tonic::IntoRequest<super::MutateKeywordPlanCampaignsRequest>,
) -> Result<tonic::Response<super::MutateKeywordPlanCampaignsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.KeywordPlanCampaignService/MutateKeywordPlanCampaigns") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordPlanRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlansRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<KeywordPlanOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "keyword_plan_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<keyword_plan_operation::Operation>,
}
pub mod keyword_plan_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::KeywordPlan),
#[prost(message, tag = "2")]
Update(super::super::resources::KeywordPlan),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlansResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateKeywordPlansResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateKeywordPlansResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastCurveRequest {
#[prost(string, tag = "1")]
pub keyword_plan: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastCurveResponse {
#[prost(message, repeated, tag = "1")]
pub campaign_forecast_curves: ::prost::alloc::vec::Vec<KeywordPlanCampaignForecastCurve>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastTimeSeriesRequest {
#[prost(string, tag = "1")]
pub keyword_plan: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastTimeSeriesResponse {
#[prost(message, repeated, tag = "1")]
pub weekly_time_series_forecasts: ::prost::alloc::vec::Vec<KeywordPlanWeeklyTimeSeriesForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastMetricsRequest {
#[prost(string, tag = "1")]
pub keyword_plan: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateForecastMetricsResponse {
#[prost(message, repeated, tag = "1")]
pub campaign_forecasts: ::prost::alloc::vec::Vec<KeywordPlanCampaignForecast>,
#[prost(message, repeated, tag = "2")]
pub ad_group_forecasts: ::prost::alloc::vec::Vec<KeywordPlanAdGroupForecast>,
#[prost(message, repeated, tag = "3")]
pub keyword_forecasts: ::prost::alloc::vec::Vec<KeywordPlanKeywordForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanCampaignForecast {
#[prost(string, optional, tag = "3")]
pub keyword_plan_campaign: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub campaign_forecast: ::core::option::Option<ForecastMetrics>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanAdGroupForecast {
#[prost(string, optional, tag = "3")]
pub keyword_plan_ad_group: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub ad_group_forecast: ::core::option::Option<ForecastMetrics>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanKeywordForecast {
#[prost(string, optional, tag = "3")]
pub keyword_plan_ad_group_keyword: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub keyword_forecast: ::core::option::Option<ForecastMetrics>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanCampaignForecastCurve {
#[prost(string, optional, tag = "3")]
pub keyword_plan_campaign: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub max_cpc_bid_forecast_curve: ::core::option::Option<KeywordPlanMaxCpcBidForecastCurve>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanMaxCpcBidForecastCurve {
#[prost(message, repeated, tag = "1")]
pub max_cpc_bid_forecasts: ::prost::alloc::vec::Vec<KeywordPlanMaxCpcBidForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanMaxCpcBidForecast {
#[prost(int64, optional, tag = "3")]
pub max_cpc_bid_micros: ::core::option::Option<i64>,
#[prost(message, optional, tag = "2")]
pub max_cpc_bid_forecast: ::core::option::Option<ForecastMetrics>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanWeeklyTimeSeriesForecast {
#[prost(string, optional, tag = "1")]
pub keyword_plan_campaign: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub weekly_forecasts: ::prost::alloc::vec::Vec<KeywordPlanWeeklyForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanWeeklyForecast {
#[prost(string, optional, tag = "1")]
pub start_date: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub forecast: ::core::option::Option<ForecastMetrics>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForecastMetrics {
#[prost(double, optional, tag = "7")]
pub impressions: ::core::option::Option<f64>,
#[prost(double, optional, tag = "8")]
pub ctr: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "9")]
pub average_cpc: ::core::option::Option<i64>,
#[prost(double, optional, tag = "10")]
pub clicks: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "11")]
pub cost_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateHistoricalMetricsRequest {
#[prost(string, tag = "1")]
pub keyword_plan: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub aggregate_metrics: ::core::option::Option<super::common::KeywordPlanAggregateMetrics>,
#[prost(message, optional, tag = "3")]
pub historical_metrics_options: ::core::option::Option<super::common::HistoricalMetricsOptions>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateHistoricalMetricsResponse {
#[prost(message, repeated, tag = "1")]
pub metrics: ::prost::alloc::vec::Vec<KeywordPlanKeywordHistoricalMetrics>,
#[prost(message, optional, tag = "2")]
pub aggregate_metric_results:
::core::option::Option<super::common::KeywordPlanAggregateMetricResults>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordPlanKeywordHistoricalMetrics {
#[prost(string, optional, tag = "4")]
pub search_query: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub close_variants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub keyword_metrics: ::core::option::Option<super::common::KeywordPlanHistoricalMetrics>,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage keyword plans."]
#[derive(Debug, Clone)]
pub struct KeywordPlanServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested plan in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_plan(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordPlanRequest>,
) -> Result<tonic::Response<super::super::resources::KeywordPlan>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/GetKeywordPlan",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes keyword plans. Operation statuses are"]
#[doc = " returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_keyword_plans(
&mut self,
request: impl tonic::IntoRequest<super::MutateKeywordPlansRequest>,
) -> Result<tonic::Response<super::MutateKeywordPlansResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/MutateKeywordPlans",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the requested Keyword Plan forecast curve."]
#[doc = " Only the bidding strategy is considered for generating forecast curve."]
#[doc = " The bidding strategy value specified in the plan is ignored."]
#[doc = ""]
#[doc = " To generate a forecast at a value specified in the plan, use"]
#[doc = " KeywordPlanService.GenerateForecastMetrics."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_forecast_curve(
&mut self,
request: impl tonic::IntoRequest<super::GenerateForecastCurveRequest>,
) -> Result<tonic::Response<super::GenerateForecastCurveResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/GenerateForecastCurve",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns a forecast in the form of a time series for the Keyword Plan over"]
#[doc = " the next 52 weeks."]
#[doc = " (1) Forecasts closer to the current date are generally more accurate than"]
#[doc = " further out."]
#[doc = ""]
#[doc = " (2) The forecast reflects seasonal trends using current and"]
#[doc = " prior traffic patterns. The forecast period of the plan is ignored."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_forecast_time_series(
&mut self,
request: impl tonic::IntoRequest<super::GenerateForecastTimeSeriesRequest>,
) -> Result<tonic::Response<super::GenerateForecastTimeSeriesResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/GenerateForecastTimeSeries",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the requested Keyword Plan forecasts."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_forecast_metrics(
&mut self,
request: impl tonic::IntoRequest<super::GenerateForecastMetricsRequest>,
) -> Result<tonic::Response<super::GenerateForecastMetricsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/GenerateForecastMetrics",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the requested Keyword Plan historical metrics."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_historical_metrics(
&mut self,
request: impl tonic::IntoRequest<super::GenerateHistoricalMetricsRequest>,
) -> Result<tonic::Response<super::GenerateHistoricalMetricsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanService/GenerateHistoricalMetrics",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLabelRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateLabelsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<LabelOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "label_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<label_operation::Operation>,
}
pub mod label_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::Label),
#[prost(message, tag = "2")]
Update(super::super::resources::Label),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateLabelsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateLabelResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateLabelResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub label: ::core::option::Option<super::resources::Label>,
}
#[doc = r" Generated client implementations."]
pub mod label_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage labels."]
#[derive(Debug, Clone)]
pub struct LabelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> LabelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> LabelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
LabelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested label in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_label(
&mut self,
request: impl tonic::IntoRequest<super::GetLabelRequest>,
) -> Result<tonic::Response<super::super::resources::Label>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LabelService/GetLabel",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes labels. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [LabelError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_labels(
&mut self,
request: impl tonic::IntoRequest<super::MutateLabelsRequest>,
) -> Result<tonic::Response<super::MutateLabelsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LabelService/MutateLabels",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMediaFileRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMediaFilesRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<MediaFileOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MediaFileOperation {
#[prost(oneof = "media_file_operation::Operation", tags = "1")]
pub operation: ::core::option::Option<media_file_operation::Operation>,
}
pub mod media_file_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::MediaFile),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMediaFilesResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateMediaFileResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMediaFileResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub media_file: ::core::option::Option<super::resources::MediaFile>,
}
#[doc = r" Generated client implementations."]
pub mod media_file_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage media files."]
#[derive(Debug, Clone)]
pub struct MediaFileServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MediaFileServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MediaFileServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MediaFileServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested media file in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_media_file(
&mut self,
request: impl tonic::IntoRequest<super::GetMediaFileRequest>,
) -> Result<tonic::Response<super::super::resources::MediaFile>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.MediaFileService/GetMediaFile",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates media files. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [ImageError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MediaBundleError]()"]
#[doc = " [MediaFileError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_media_files(
&mut self,
request: impl tonic::IntoRequest<super::MutateMediaFilesRequest>,
) -> Result<tonic::Response<super::MutateMediaFilesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.MediaFileService/MutateMediaFiles",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRemarketingActionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRemarketingActionsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<RemarketingActionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemarketingActionOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "remarketing_action_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<remarketing_action_operation::Operation>,
}
pub mod remarketing_action_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::RemarketingAction),
#[prost(message, tag = "2")]
Update(super::super::resources::RemarketingAction),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRemarketingActionsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateRemarketingActionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateRemarketingActionResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod remarketing_action_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage remarketing actions."]
#[derive(Debug, Clone)]
pub struct RemarketingActionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> RemarketingActionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> RemarketingActionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
RemarketingActionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested remarketing action in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_remarketing_action(
&mut self,
request: impl tonic::IntoRequest<super::GetRemarketingActionRequest>,
) -> Result<tonic::Response<super::super::resources::RemarketingAction>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.RemarketingActionService/GetRemarketingAction",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates remarketing actions. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ConversionActionError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_remarketing_actions(
&mut self,
request: impl tonic::IntoRequest<super::MutateRemarketingActionsRequest>,
) -> Result<tonic::Response<super::MutateRemarketingActionsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.RemarketingActionService/MutateRemarketingActions") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSharedCriterionRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedCriteriaRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<SharedCriterionOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedCriterionOperation {
#[prost(oneof = "shared_criterion_operation::Operation", tags = "1, 3")]
pub operation: ::core::option::Option<shared_criterion_operation::Operation>,
}
pub mod shared_criterion_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::SharedCriterion),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedCriteriaResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateSharedCriterionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedCriterionResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub shared_criterion: ::core::option::Option<super::resources::SharedCriterion>,
}
#[doc = r" Generated client implementations."]
pub mod shared_criterion_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage shared criteria."]
#[derive(Debug, Clone)]
pub struct SharedCriterionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SharedCriterionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SharedCriterionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
SharedCriterionServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested shared criterion in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_shared_criterion(
&mut self,
request: impl tonic::IntoRequest<super::GetSharedCriterionRequest>,
) -> Result<tonic::Response<super::super::resources::SharedCriterion>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.SharedCriterionService/GetSharedCriterion",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes shared criteria. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_shared_criteria(
&mut self,
request: impl tonic::IntoRequest<super::MutateSharedCriteriaRequest>,
) -> Result<tonic::Response<super::MutateSharedCriteriaResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.SharedCriterionService/MutateSharedCriteria",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSharedSetRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedSetsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<SharedSetOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedSetOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "shared_set_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<shared_set_operation::Operation>,
}
pub mod shared_set_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::SharedSet),
#[prost(message, tag = "2")]
Update(super::super::resources::SharedSet),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedSetsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateSharedSetResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateSharedSetResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub shared_set: ::core::option::Option<super::resources::SharedSet>,
}
#[doc = r" Generated client implementations."]
pub mod shared_set_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage shared sets."]
#[derive(Debug, Clone)]
pub struct SharedSetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SharedSetServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SharedSetServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
SharedSetServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested shared set in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_shared_set(
&mut self,
request: impl tonic::IntoRequest<super::GetSharedSetRequest>,
) -> Result<tonic::Response<super::super::resources::SharedSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.SharedSetService/GetSharedSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes shared sets. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [IdError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperatorError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SharedSetError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_shared_sets(
&mut self,
request: impl tonic::IntoRequest<super::MutateSharedSetsRequest>,
) -> Result<tonic::Response<super::MutateSharedSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.SharedSetService/MutateSharedSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserListRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateUserListsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<UserListOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserListOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "user_list_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<user_list_operation::Operation>,
}
pub mod user_list_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::UserList),
#[prost(message, tag = "2")]
Update(super::super::resources::UserList),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateUserListsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateUserListResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateUserListResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod user_list_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage user lists."]
#[derive(Debug, Clone)]
pub struct UserListServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> UserListServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserListServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
UserListServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested user list."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_user_list(
&mut self,
request: impl tonic::IntoRequest<super::GetUserListRequest>,
) -> Result<tonic::Response<super::super::resources::UserList>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.UserListService/GetUserList",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates user lists. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [NotEmptyError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UserListError]()"]
pub async fn mutate_user_lists(
&mut self,
request: impl tonic::IntoRequest<super::MutateUserListsRequest>,
) -> Result<tonic::Response<super::MutateUserListsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.UserListService/MutateUserLists",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub page_size: i32,
#[prost(bool, tag = "5")]
pub validate_only: bool,
#[prost(bool, tag = "7")]
pub return_total_results_count: bool,
#[prost(enumeration = "super::enums::summary_row_setting_enum::SummaryRowSetting", tag = "8")]
pub summary_row_setting: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<GoogleAdsRow>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub total_results_count: i64,
#[prost(message, optional, tag = "5")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "6")]
pub summary_row: ::core::option::Option<GoogleAdsRow>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsStreamRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub query: ::prost::alloc::string::String,
#[prost(enumeration = "super::enums::summary_row_setting_enum::SummaryRowSetting", tag = "3")]
pub summary_row_setting: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsStreamResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<GoogleAdsRow>,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "3")]
pub summary_row: ::core::option::Option<GoogleAdsRow>,
#[prost(string, tag = "4")]
pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GoogleAdsRow {
#[prost(message, optional, tag = "42")]
pub account_budget: ::core::option::Option<super::resources::AccountBudget>,
#[prost(message, optional, tag = "43")]
pub account_budget_proposal: ::core::option::Option<super::resources::AccountBudgetProposal>,
#[prost(message, optional, tag = "143")]
pub account_link: ::core::option::Option<super::resources::AccountLink>,
#[prost(message, optional, tag = "3")]
pub ad_group: ::core::option::Option<super::resources::AdGroup>,
#[prost(message, optional, tag = "16")]
pub ad_group_ad: ::core::option::Option<super::resources::AdGroupAd>,
#[prost(message, optional, tag = "131")]
pub ad_group_ad_asset_view: ::core::option::Option<super::resources::AdGroupAdAssetView>,
#[prost(message, optional, tag = "120")]
pub ad_group_ad_label: ::core::option::Option<super::resources::AdGroupAdLabel>,
#[prost(message, optional, tag = "154")]
pub ad_group_asset: ::core::option::Option<super::resources::AdGroupAsset>,
#[prost(message, optional, tag = "57")]
pub ad_group_audience_view: ::core::option::Option<super::resources::AdGroupAudienceView>,
#[prost(message, optional, tag = "24")]
pub ad_group_bid_modifier: ::core::option::Option<super::resources::AdGroupBidModifier>,
#[prost(message, optional, tag = "17")]
pub ad_group_criterion: ::core::option::Option<super::resources::AdGroupCriterion>,
#[prost(message, optional, tag = "121")]
pub ad_group_criterion_label: ::core::option::Option<super::resources::AdGroupCriterionLabel>,
#[prost(message, optional, tag = "110")]
pub ad_group_criterion_simulation:
::core::option::Option<super::resources::AdGroupCriterionSimulation>,
#[prost(message, optional, tag = "112")]
pub ad_group_extension_setting:
::core::option::Option<super::resources::AdGroupExtensionSetting>,
#[prost(message, optional, tag = "67")]
pub ad_group_feed: ::core::option::Option<super::resources::AdGroupFeed>,
#[prost(message, optional, tag = "115")]
pub ad_group_label: ::core::option::Option<super::resources::AdGroupLabel>,
#[prost(message, optional, tag = "107")]
pub ad_group_simulation: ::core::option::Option<super::resources::AdGroupSimulation>,
#[prost(message, optional, tag = "130")]
pub ad_parameter: ::core::option::Option<super::resources::AdParameter>,
#[prost(message, optional, tag = "48")]
pub age_range_view: ::core::option::Option<super::resources::AgeRangeView>,
#[prost(message, optional, tag = "89")]
pub ad_schedule_view: ::core::option::Option<super::resources::AdScheduleView>,
#[prost(message, optional, tag = "91")]
pub domain_category: ::core::option::Option<super::resources::DomainCategory>,
#[prost(message, optional, tag = "105")]
pub asset: ::core::option::Option<super::resources::Asset>,
#[prost(message, optional, tag = "139")]
pub batch_job: ::core::option::Option<super::resources::BatchJob>,
#[prost(message, optional, tag = "18")]
pub bidding_strategy: ::core::option::Option<super::resources::BiddingStrategy>,
#[prost(message, optional, tag = "158")]
pub bidding_strategy_simulation:
::core::option::Option<super::resources::BiddingStrategySimulation>,
#[prost(message, optional, tag = "41")]
pub billing_setup: ::core::option::Option<super::resources::BillingSetup>,
#[prost(message, optional, tag = "152")]
pub call_view: ::core::option::Option<super::resources::CallView>,
#[prost(message, optional, tag = "19")]
pub campaign_budget: ::core::option::Option<super::resources::CampaignBudget>,
#[prost(message, optional, tag = "2")]
pub campaign: ::core::option::Option<super::resources::Campaign>,
#[prost(message, optional, tag = "142")]
pub campaign_asset: ::core::option::Option<super::resources::CampaignAsset>,
#[prost(message, optional, tag = "69")]
pub campaign_audience_view: ::core::option::Option<super::resources::CampaignAudienceView>,
#[prost(message, optional, tag = "26")]
pub campaign_bid_modifier: ::core::option::Option<super::resources::CampaignBidModifier>,
#[prost(message, optional, tag = "20")]
pub campaign_criterion: ::core::option::Option<super::resources::CampaignCriterion>,
#[prost(message, optional, tag = "111")]
pub campaign_criterion_simulation:
::core::option::Option<super::resources::CampaignCriterionSimulation>,
#[prost(message, optional, tag = "49")]
pub campaign_draft: ::core::option::Option<super::resources::CampaignDraft>,
#[prost(message, optional, tag = "84")]
pub campaign_experiment: ::core::option::Option<super::resources::CampaignExperiment>,
#[prost(message, optional, tag = "113")]
pub campaign_extension_setting:
::core::option::Option<super::resources::CampaignExtensionSetting>,
#[prost(message, optional, tag = "63")]
pub campaign_feed: ::core::option::Option<super::resources::CampaignFeed>,
#[prost(message, optional, tag = "108")]
pub campaign_label: ::core::option::Option<super::resources::CampaignLabel>,
#[prost(message, optional, tag = "30")]
pub campaign_shared_set: ::core::option::Option<super::resources::CampaignSharedSet>,
#[prost(message, optional, tag = "157")]
pub campaign_simulation: ::core::option::Option<super::resources::CampaignSimulation>,
#[prost(message, optional, tag = "66")]
pub carrier_constant: ::core::option::Option<super::resources::CarrierConstant>,
#[prost(message, optional, tag = "145")]
pub change_event: ::core::option::Option<super::resources::ChangeEvent>,
#[prost(message, optional, tag = "37")]
pub change_status: ::core::option::Option<super::resources::ChangeStatus>,
#[prost(message, optional, tag = "148")]
pub combined_audience: ::core::option::Option<super::resources::CombinedAudience>,
#[prost(message, optional, tag = "103")]
pub conversion_action: ::core::option::Option<super::resources::ConversionAction>,
#[prost(message, optional, tag = "153")]
pub conversion_custom_variable:
::core::option::Option<super::resources::ConversionCustomVariable>,
#[prost(message, optional, tag = "122")]
pub click_view: ::core::option::Option<super::resources::ClickView>,
#[prost(message, optional, tag = "134")]
pub currency_constant: ::core::option::Option<super::resources::CurrencyConstant>,
#[prost(message, optional, tag = "147")]
pub custom_audience: ::core::option::Option<super::resources::CustomAudience>,
#[prost(message, optional, tag = "104")]
pub custom_interest: ::core::option::Option<super::resources::CustomInterest>,
#[prost(message, optional, tag = "1")]
pub customer: ::core::option::Option<super::resources::Customer>,
#[prost(message, optional, tag = "155")]
pub customer_asset: ::core::option::Option<super::resources::CustomerAsset>,
#[prost(message, optional, tag = "61")]
pub customer_manager_link: ::core::option::Option<super::resources::CustomerManagerLink>,
#[prost(message, optional, tag = "62")]
pub customer_client_link: ::core::option::Option<super::resources::CustomerClientLink>,
#[prost(message, optional, tag = "70")]
pub customer_client: ::core::option::Option<super::resources::CustomerClient>,
#[prost(message, optional, tag = "114")]
pub customer_extension_setting:
::core::option::Option<super::resources::CustomerExtensionSetting>,
#[prost(message, optional, tag = "64")]
pub customer_feed: ::core::option::Option<super::resources::CustomerFeed>,
#[prost(message, optional, tag = "124")]
pub customer_label: ::core::option::Option<super::resources::CustomerLabel>,
#[prost(message, optional, tag = "88")]
pub customer_negative_criterion:
::core::option::Option<super::resources::CustomerNegativeCriterion>,
#[prost(message, optional, tag = "146")]
pub customer_user_access: ::core::option::Option<super::resources::CustomerUserAccess>,
#[prost(message, optional, tag = "150")]
pub customer_user_access_invitation:
::core::option::Option<super::resources::CustomerUserAccessInvitation>,
#[prost(message, optional, tag = "118")]
pub detail_placement_view: ::core::option::Option<super::resources::DetailPlacementView>,
#[prost(message, optional, tag = "47")]
pub display_keyword_view: ::core::option::Option<super::resources::DisplayKeywordView>,
#[prost(message, optional, tag = "132")]
pub distance_view: ::core::option::Option<super::resources::DistanceView>,
#[prost(message, optional, tag = "106")]
pub dynamic_search_ads_search_term_view:
::core::option::Option<super::resources::DynamicSearchAdsSearchTermView>,
#[prost(message, optional, tag = "128")]
pub expanded_landing_page_view:
::core::option::Option<super::resources::ExpandedLandingPageView>,
#[prost(message, optional, tag = "85")]
pub extension_feed_item: ::core::option::Option<super::resources::ExtensionFeedItem>,
#[prost(message, optional, tag = "46")]
pub feed: ::core::option::Option<super::resources::Feed>,
#[prost(message, optional, tag = "50")]
pub feed_item: ::core::option::Option<super::resources::FeedItem>,
#[prost(message, optional, tag = "149")]
pub feed_item_set: ::core::option::Option<super::resources::FeedItemSet>,
#[prost(message, optional, tag = "151")]
pub feed_item_set_link: ::core::option::Option<super::resources::FeedItemSetLink>,
#[prost(message, optional, tag = "116")]
pub feed_item_target: ::core::option::Option<super::resources::FeedItemTarget>,
#[prost(message, optional, tag = "58")]
pub feed_mapping: ::core::option::Option<super::resources::FeedMapping>,
#[prost(message, optional, tag = "97")]
pub feed_placeholder_view: ::core::option::Option<super::resources::FeedPlaceholderView>,
#[prost(message, optional, tag = "40")]
pub gender_view: ::core::option::Option<super::resources::GenderView>,
#[prost(message, optional, tag = "23")]
pub geo_target_constant: ::core::option::Option<super::resources::GeoTargetConstant>,
#[prost(message, optional, tag = "125")]
pub geographic_view: ::core::option::Option<super::resources::GeographicView>,
#[prost(message, optional, tag = "119")]
pub group_placement_view: ::core::option::Option<super::resources::GroupPlacementView>,
#[prost(message, optional, tag = "51")]
pub hotel_group_view: ::core::option::Option<super::resources::HotelGroupView>,
#[prost(message, optional, tag = "71")]
pub hotel_performance_view: ::core::option::Option<super::resources::HotelPerformanceView>,
#[prost(message, optional, tag = "138")]
pub income_range_view: ::core::option::Option<super::resources::IncomeRangeView>,
#[prost(message, optional, tag = "21")]
pub keyword_view: ::core::option::Option<super::resources::KeywordView>,
#[prost(message, optional, tag = "32")]
pub keyword_plan: ::core::option::Option<super::resources::KeywordPlan>,
#[prost(message, optional, tag = "33")]
pub keyword_plan_campaign: ::core::option::Option<super::resources::KeywordPlanCampaign>,
#[prost(message, optional, tag = "140")]
pub keyword_plan_campaign_keyword:
::core::option::Option<super::resources::KeywordPlanCampaignKeyword>,
#[prost(message, optional, tag = "35")]
pub keyword_plan_ad_group: ::core::option::Option<super::resources::KeywordPlanAdGroup>,
#[prost(message, optional, tag = "141")]
pub keyword_plan_ad_group_keyword:
::core::option::Option<super::resources::KeywordPlanAdGroupKeyword>,
#[prost(message, optional, tag = "52")]
pub label: ::core::option::Option<super::resources::Label>,
#[prost(message, optional, tag = "126")]
pub landing_page_view: ::core::option::Option<super::resources::LandingPageView>,
#[prost(message, optional, tag = "55")]
pub language_constant: ::core::option::Option<super::resources::LanguageConstant>,
#[prost(message, optional, tag = "123")]
pub location_view: ::core::option::Option<super::resources::LocationView>,
#[prost(message, optional, tag = "53")]
pub managed_placement_view: ::core::option::Option<super::resources::ManagedPlacementView>,
#[prost(message, optional, tag = "90")]
pub media_file: ::core::option::Option<super::resources::MediaFile>,
#[prost(message, optional, tag = "87")]
pub mobile_app_category_constant:
::core::option::Option<super::resources::MobileAppCategoryConstant>,
#[prost(message, optional, tag = "98")]
pub mobile_device_constant: ::core::option::Option<super::resources::MobileDeviceConstant>,
#[prost(message, optional, tag = "137")]
pub offline_user_data_job: ::core::option::Option<super::resources::OfflineUserDataJob>,
#[prost(message, optional, tag = "86")]
pub operating_system_version_constant:
::core::option::Option<super::resources::OperatingSystemVersionConstant>,
#[prost(message, optional, tag = "129")]
pub paid_organic_search_term_view:
::core::option::Option<super::resources::PaidOrganicSearchTermView>,
#[prost(message, optional, tag = "45")]
pub parental_status_view: ::core::option::Option<super::resources::ParentalStatusView>,
#[prost(message, optional, tag = "109")]
pub product_bidding_category_constant:
::core::option::Option<super::resources::ProductBiddingCategoryConstant>,
#[prost(message, optional, tag = "54")]
pub product_group_view: ::core::option::Option<super::resources::ProductGroupView>,
#[prost(message, optional, tag = "22")]
pub recommendation: ::core::option::Option<super::resources::Recommendation>,
#[prost(message, optional, tag = "68")]
pub search_term_view: ::core::option::Option<super::resources::SearchTermView>,
#[prost(message, optional, tag = "29")]
pub shared_criterion: ::core::option::Option<super::resources::SharedCriterion>,
#[prost(message, optional, tag = "27")]
pub shared_set: ::core::option::Option<super::resources::SharedSet>,
#[prost(message, optional, tag = "117")]
pub shopping_performance_view:
::core::option::Option<super::resources::ShoppingPerformanceView>,
#[prost(message, optional, tag = "144")]
pub third_party_app_analytics_link:
::core::option::Option<super::resources::ThirdPartyAppAnalyticsLink>,
#[prost(message, optional, tag = "44")]
pub topic_view: ::core::option::Option<super::resources::TopicView>,
#[prost(message, optional, tag = "59")]
pub user_interest: ::core::option::Option<super::resources::UserInterest>,
#[prost(message, optional, tag = "161")]
pub life_event: ::core::option::Option<super::resources::LifeEvent>,
#[prost(message, optional, tag = "38")]
pub user_list: ::core::option::Option<super::resources::UserList>,
#[prost(message, optional, tag = "135")]
pub user_location_view: ::core::option::Option<super::resources::UserLocationView>,
#[prost(message, optional, tag = "60")]
pub remarketing_action: ::core::option::Option<super::resources::RemarketingAction>,
#[prost(message, optional, tag = "31")]
pub topic_constant: ::core::option::Option<super::resources::TopicConstant>,
#[prost(message, optional, tag = "39")]
pub video: ::core::option::Option<super::resources::Video>,
#[prost(message, optional, tag = "162")]
pub webpage_view: ::core::option::Option<super::resources::WebpageView>,
#[prost(message, optional, tag = "4")]
pub metrics: ::core::option::Option<super::common::Metrics>,
#[prost(message, optional, tag = "102")]
pub segments: ::core::option::Option<super::common::Segments>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateGoogleAdsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub mutate_operations: ::prost::alloc::vec::Vec<MutateOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "5"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateGoogleAdsResponse {
#[prost(message, optional, tag = "3")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "1")]
pub mutate_operation_responses: ::prost::alloc::vec::Vec<MutateOperationResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateOperation {
#[prost(
oneof = "mutate_operation::Operation",
tags = "17, 1, 56, 2, 18, 3, 19, 20, 21, 5, 49, 22, 23, 6, 52, 7, 8, 13, 24, 25, 26, 27, 28, 10, 11, 12, 55, 57, 30, 31, 32, 34, 35, 36, 37, 53, 54, 38, 39, 40, 44, 50, 51, 45, 48, 41, 42, 43, 14, 15, 16"
)]
pub operation: ::core::option::Option<mutate_operation::Operation>,
}
pub mod mutate_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "17")]
AdGroupAdLabelOperation(super::AdGroupAdLabelOperation),
#[prost(message, tag = "1")]
AdGroupAdOperation(super::AdGroupAdOperation),
#[prost(message, tag = "56")]
AdGroupAssetOperation(super::AdGroupAssetOperation),
#[prost(message, tag = "2")]
AdGroupBidModifierOperation(super::AdGroupBidModifierOperation),
#[prost(message, tag = "18")]
AdGroupCriterionLabelOperation(super::AdGroupCriterionLabelOperation),
#[prost(message, tag = "3")]
AdGroupCriterionOperation(super::AdGroupCriterionOperation),
#[prost(message, tag = "19")]
AdGroupExtensionSettingOperation(super::AdGroupExtensionSettingOperation),
#[prost(message, tag = "20")]
AdGroupFeedOperation(super::AdGroupFeedOperation),
#[prost(message, tag = "21")]
AdGroupLabelOperation(super::AdGroupLabelOperation),
#[prost(message, tag = "5")]
AdGroupOperation(super::AdGroupOperation),
#[prost(message, tag = "49")]
AdOperation(super::AdOperation),
#[prost(message, tag = "22")]
AdParameterOperation(super::AdParameterOperation),
#[prost(message, tag = "23")]
AssetOperation(super::AssetOperation),
#[prost(message, tag = "6")]
BiddingStrategyOperation(super::BiddingStrategyOperation),
#[prost(message, tag = "52")]
CampaignAssetOperation(super::CampaignAssetOperation),
#[prost(message, tag = "7")]
CampaignBidModifierOperation(super::CampaignBidModifierOperation),
#[prost(message, tag = "8")]
CampaignBudgetOperation(super::CampaignBudgetOperation),
#[prost(message, tag = "13")]
CampaignCriterionOperation(super::CampaignCriterionOperation),
#[prost(message, tag = "24")]
CampaignDraftOperation(super::CampaignDraftOperation),
#[prost(message, tag = "25")]
CampaignExperimentOperation(super::CampaignExperimentOperation),
#[prost(message, tag = "26")]
CampaignExtensionSettingOperation(super::CampaignExtensionSettingOperation),
#[prost(message, tag = "27")]
CampaignFeedOperation(super::CampaignFeedOperation),
#[prost(message, tag = "28")]
CampaignLabelOperation(super::CampaignLabelOperation),
#[prost(message, tag = "10")]
CampaignOperation(super::CampaignOperation),
#[prost(message, tag = "11")]
CampaignSharedSetOperation(super::CampaignSharedSetOperation),
#[prost(message, tag = "12")]
ConversionActionOperation(super::ConversionActionOperation),
#[prost(message, tag = "55")]
ConversionCustomVariableOperation(super::ConversionCustomVariableOperation),
#[prost(message, tag = "57")]
CustomerAssetOperation(super::CustomerAssetOperation),
#[prost(message, tag = "30")]
CustomerExtensionSettingOperation(super::CustomerExtensionSettingOperation),
#[prost(message, tag = "31")]
CustomerFeedOperation(super::CustomerFeedOperation),
#[prost(message, tag = "32")]
CustomerLabelOperation(super::CustomerLabelOperation),
#[prost(message, tag = "34")]
CustomerNegativeCriterionOperation(super::CustomerNegativeCriterionOperation),
#[prost(message, tag = "35")]
CustomerOperation(super::CustomerOperation),
#[prost(message, tag = "36")]
ExtensionFeedItemOperation(super::ExtensionFeedItemOperation),
#[prost(message, tag = "37")]
FeedItemOperation(super::FeedItemOperation),
#[prost(message, tag = "53")]
FeedItemSetOperation(super::FeedItemSetOperation),
#[prost(message, tag = "54")]
FeedItemSetLinkOperation(super::FeedItemSetLinkOperation),
#[prost(message, tag = "38")]
FeedItemTargetOperation(super::FeedItemTargetOperation),
#[prost(message, tag = "39")]
FeedMappingOperation(super::FeedMappingOperation),
#[prost(message, tag = "40")]
FeedOperation(super::FeedOperation),
#[prost(message, tag = "44")]
KeywordPlanAdGroupOperation(super::KeywordPlanAdGroupOperation),
#[prost(message, tag = "50")]
KeywordPlanAdGroupKeywordOperation(super::KeywordPlanAdGroupKeywordOperation),
#[prost(message, tag = "51")]
KeywordPlanCampaignKeywordOperation(super::KeywordPlanCampaignKeywordOperation),
#[prost(message, tag = "45")]
KeywordPlanCampaignOperation(super::KeywordPlanCampaignOperation),
#[prost(message, tag = "48")]
KeywordPlanOperation(super::KeywordPlanOperation),
#[prost(message, tag = "41")]
LabelOperation(super::LabelOperation),
#[prost(message, tag = "42")]
MediaFileOperation(super::MediaFileOperation),
#[prost(message, tag = "43")]
RemarketingActionOperation(super::RemarketingActionOperation),
#[prost(message, tag = "14")]
SharedCriterionOperation(super::SharedCriterionOperation),
#[prost(message, tag = "15")]
SharedSetOperation(super::SharedSetOperation),
#[prost(message, tag = "16")]
UserListOperation(super::UserListOperation),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateOperationResponse {
#[prost(
oneof = "mutate_operation_response::Response",
tags = "17, 1, 56, 2, 18, 3, 19, 20, 21, 5, 22, 49, 23, 6, 52, 7, 8, 13, 24, 25, 26, 27, 28, 10, 11, 12, 55, 57, 30, 31, 32, 34, 35, 36, 37, 53, 54, 38, 39, 40, 44, 45, 50, 51, 48, 41, 42, 43, 14, 15, 16"
)]
pub response: ::core::option::Option<mutate_operation_response::Response>,
}
pub mod mutate_operation_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "17")]
AdGroupAdLabelResult(super::MutateAdGroupAdLabelResult),
#[prost(message, tag = "1")]
AdGroupAdResult(super::MutateAdGroupAdResult),
#[prost(message, tag = "56")]
AdGroupAssetResult(super::MutateAdGroupAssetResult),
#[prost(message, tag = "2")]
AdGroupBidModifierResult(super::MutateAdGroupBidModifierResult),
#[prost(message, tag = "18")]
AdGroupCriterionLabelResult(super::MutateAdGroupCriterionLabelResult),
#[prost(message, tag = "3")]
AdGroupCriterionResult(super::MutateAdGroupCriterionResult),
#[prost(message, tag = "19")]
AdGroupExtensionSettingResult(super::MutateAdGroupExtensionSettingResult),
#[prost(message, tag = "20")]
AdGroupFeedResult(super::MutateAdGroupFeedResult),
#[prost(message, tag = "21")]
AdGroupLabelResult(super::MutateAdGroupLabelResult),
#[prost(message, tag = "5")]
AdGroupResult(super::MutateAdGroupResult),
#[prost(message, tag = "22")]
AdParameterResult(super::MutateAdParameterResult),
#[prost(message, tag = "49")]
AdResult(super::MutateAdResult),
#[prost(message, tag = "23")]
AssetResult(super::MutateAssetResult),
#[prost(message, tag = "6")]
BiddingStrategyResult(super::MutateBiddingStrategyResult),
#[prost(message, tag = "52")]
CampaignAssetResult(super::MutateCampaignAssetResult),
#[prost(message, tag = "7")]
CampaignBidModifierResult(super::MutateCampaignBidModifierResult),
#[prost(message, tag = "8")]
CampaignBudgetResult(super::MutateCampaignBudgetResult),
#[prost(message, tag = "13")]
CampaignCriterionResult(super::MutateCampaignCriterionResult),
#[prost(message, tag = "24")]
CampaignDraftResult(super::MutateCampaignDraftResult),
#[prost(message, tag = "25")]
CampaignExperimentResult(super::MutateCampaignExperimentResult),
#[prost(message, tag = "26")]
CampaignExtensionSettingResult(super::MutateCampaignExtensionSettingResult),
#[prost(message, tag = "27")]
CampaignFeedResult(super::MutateCampaignFeedResult),
#[prost(message, tag = "28")]
CampaignLabelResult(super::MutateCampaignLabelResult),
#[prost(message, tag = "10")]
CampaignResult(super::MutateCampaignResult),
#[prost(message, tag = "11")]
CampaignSharedSetResult(super::MutateCampaignSharedSetResult),
#[prost(message, tag = "12")]
ConversionActionResult(super::MutateConversionActionResult),
#[prost(message, tag = "55")]
ConversionCustomVariableResult(super::MutateConversionCustomVariableResult),
#[prost(message, tag = "57")]
CustomerAssetResult(super::MutateCustomerAssetResult),
#[prost(message, tag = "30")]
CustomerExtensionSettingResult(super::MutateCustomerExtensionSettingResult),
#[prost(message, tag = "31")]
CustomerFeedResult(super::MutateCustomerFeedResult),
#[prost(message, tag = "32")]
CustomerLabelResult(super::MutateCustomerLabelResult),
#[prost(message, tag = "34")]
CustomerNegativeCriterionResult(super::MutateCustomerNegativeCriteriaResult),
#[prost(message, tag = "35")]
CustomerResult(super::MutateCustomerResult),
#[prost(message, tag = "36")]
ExtensionFeedItemResult(super::MutateExtensionFeedItemResult),
#[prost(message, tag = "37")]
FeedItemResult(super::MutateFeedItemResult),
#[prost(message, tag = "53")]
FeedItemSetResult(super::MutateFeedItemSetResult),
#[prost(message, tag = "54")]
FeedItemSetLinkResult(super::MutateFeedItemSetLinkResult),
#[prost(message, tag = "38")]
FeedItemTargetResult(super::MutateFeedItemTargetResult),
#[prost(message, tag = "39")]
FeedMappingResult(super::MutateFeedMappingResult),
#[prost(message, tag = "40")]
FeedResult(super::MutateFeedResult),
#[prost(message, tag = "44")]
KeywordPlanAdGroupResult(super::MutateKeywordPlanAdGroupResult),
#[prost(message, tag = "45")]
KeywordPlanCampaignResult(super::MutateKeywordPlanCampaignResult),
#[prost(message, tag = "50")]
KeywordPlanAdGroupKeywordResult(super::MutateKeywordPlanAdGroupKeywordResult),
#[prost(message, tag = "51")]
KeywordPlanCampaignKeywordResult(super::MutateKeywordPlanCampaignKeywordResult),
#[prost(message, tag = "48")]
KeywordPlanResult(super::MutateKeywordPlansResult),
#[prost(message, tag = "41")]
LabelResult(super::MutateLabelResult),
#[prost(message, tag = "42")]
MediaFileResult(super::MutateMediaFileResult),
#[prost(message, tag = "43")]
RemarketingActionResult(super::MutateRemarketingActionResult),
#[prost(message, tag = "14")]
SharedCriterionResult(super::MutateSharedCriterionResult),
#[prost(message, tag = "15")]
SharedSetResult(super::MutateSharedSetResult),
#[prost(message, tag = "16")]
UserListResult(super::MutateUserListResult),
}
}
#[doc = r" Generated client implementations."]
pub mod google_ads_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch data and metrics across resources."]
#[derive(Debug, Clone)]
pub struct GoogleAdsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GoogleAdsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GoogleAdsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GoogleAdsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns all rows that match the search query."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ChangeEventError]()"]
#[doc = " [ChangeStatusError]()"]
#[doc = " [ClickViewError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QueryError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn search(
&mut self,
request: impl tonic::IntoRequest<super::SearchGoogleAdsRequest>,
) -> Result<tonic::Response<super::SearchGoogleAdsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GoogleAdsService/Search",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns all rows that match the search stream query."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ChangeEventError]()"]
#[doc = " [ChangeStatusError]()"]
#[doc = " [ClickViewError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QueryError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn search_stream(
&mut self,
request: impl tonic::IntoRequest<super::SearchGoogleAdsStreamRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::SearchGoogleAdsStreamResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GoogleAdsService/SearchStream",
);
self.inner.server_streaming(request.into_request(), path, codec).await
}
#[doc = " Creates, updates, or removes resources. This method supports atomic"]
#[doc = " transactions with multiple types of resources. For example, you can"]
#[doc = " atomically create a campaign and a campaign budget, or perform up to"]
#[doc = " thousands of mutates atomically."]
#[doc = ""]
#[doc = " This method is essentially a wrapper around a series of mutate methods. The"]
#[doc = " only features it offers over calling those methods directly are:"]
#[doc = ""]
#[doc = " - Atomic transactions"]
#[doc = " - Temp resource names (described below)"]
#[doc = " - Somewhat reduced latency over making a series of mutate calls"]
#[doc = ""]
#[doc = " Note: Only resources that support atomic transactions are included, so this"]
#[doc = " method can't replace all calls to individual services."]
#[doc = ""]
#[doc = " ## Atomic Transaction Benefits"]
#[doc = ""]
#[doc = " Atomicity makes error handling much easier. If you're making a series of"]
#[doc = " changes and one fails, it can leave your account in an inconsistent state."]
#[doc = " With atomicity, you either reach the desired state directly, or the request"]
#[doc = " fails and you can retry."]
#[doc = ""]
#[doc = " ## Temp Resource Names"]
#[doc = ""]
#[doc = " Temp resource names are a special type of resource name used to create a"]
#[doc = " resource and reference that resource in the same request. For example, if a"]
#[doc = " campaign budget is created with `resource_name` equal to"]
#[doc = " `customers/123/campaignBudgets/-1`, that resource name can be reused in"]
#[doc = " the `Campaign.budget` field in the same request. That way, the two"]
#[doc = " resources are created and linked atomically."]
#[doc = ""]
#[doc = " To create a temp resource name, put a negative number in the part of the"]
#[doc = " name that the server would normally allocate."]
#[doc = ""]
#[doc = " Note:"]
#[doc = ""]
#[doc = " - Resources must be created with a temp name before the name can be reused."]
#[doc = " For example, the previous CampaignBudget+Campaign example would fail if"]
#[doc = " the mutate order was reversed."]
#[doc = " - Temp names are not remembered across requests."]
#[doc = " - There's no limit to the number of temp names in a request."]
#[doc = " - Each temp name must use a unique negative number, even if the resource"]
#[doc = " types differ."]
#[doc = ""]
#[doc = " ## Latency"]
#[doc = ""]
#[doc = " It's important to group mutates by resource type or the request may time"]
#[doc = " out and fail. Latency is roughly equal to a series of calls to individual"]
#[doc = " mutate methods, where each change in resource type is a new call. For"]
#[doc = " example, mutating 10 campaigns then 10 ad groups is like 2 calls, while"]
#[doc = " mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AdCustomizerError]()"]
#[doc = " [AdError]()"]
#[doc = " [AdGroupAdError]()"]
#[doc = " [AdGroupCriterionError]()"]
#[doc = " [AdGroupError]()"]
#[doc = " [AssetError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BiddingError]()"]
#[doc = " [CampaignBudgetError]()"]
#[doc = " [CampaignCriterionError]()"]
#[doc = " [CampaignError]()"]
#[doc = " [CampaignExperimentError]()"]
#[doc = " [CampaignSharedSetError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [ContextError]()"]
#[doc = " [ConversionActionError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [CustomerFeedError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [DateError]()"]
#[doc = " [DateRangeError]()"]
#[doc = " [DistinctError]()"]
#[doc = " [ExtensionFeedItemError]()"]
#[doc = " [ExtensionSettingError]()"]
#[doc = " [FeedAttributeReferenceError]()"]
#[doc = " [FeedError]()"]
#[doc = " [FeedItemError]()"]
#[doc = " [FeedItemSetError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [FunctionParsingError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [ImageError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanAdGroupKeywordError]()"]
#[doc = " [KeywordPlanCampaignError]()"]
#[doc = " [KeywordPlanError]()"]
#[doc = " [LabelError]()"]
#[doc = " [ListOperationError]()"]
#[doc = " [MediaUploadError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [NullError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [PolicyFindingError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
#[doc = " [SettingError]()"]
#[doc = " [SharedSetError]()"]
#[doc = " [SizeLimitError]()"]
#[doc = " [StringFormatError]()"]
#[doc = " [StringLengthError]()"]
#[doc = " [UrlFieldError]()"]
#[doc = " [UserListError]()"]
#[doc = " [YoutubeVideoRegistrationError]()"]
pub async fn mutate(
&mut self,
request: impl tonic::IntoRequest<super::MutateGoogleAdsRequest>,
) -> Result<tonic::Response<super::MutateGoogleAdsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GoogleAdsService/Mutate",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBatchJobRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<BatchJobOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchJobOperation {
#[prost(oneof = "batch_job_operation::Operation", tags = "1")]
pub operation: ::core::option::Option<batch_job_operation::Operation>,
}
pub mod batch_job_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::BatchJob),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBatchJobResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateBatchJobResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBatchJobResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBatchJobRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunBatchJobRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddBatchJobOperationsRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub sequence_token: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub mutate_operations: ::prost::alloc::vec::Vec<MutateOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddBatchJobOperationsResponse {
#[prost(int64, tag = "1")]
pub total_operations: i64,
#[prost(string, tag = "2")]
pub next_sequence_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBatchJobResultsRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(
enumeration = "super::enums::response_content_type_enum::ResponseContentType",
tag = "4"
)]
pub response_content_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBatchJobResultsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<BatchJobResult>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchJobResult {
#[prost(int64, tag = "1")]
pub operation_index: i64,
#[prost(message, optional, tag = "2")]
pub mutate_operation_response: ::core::option::Option<MutateOperationResponse>,
#[prost(message, optional, tag = "3")]
pub status: ::core::option::Option<super::super::super::super::rpc::Status>,
}
#[doc = r" Generated client implementations."]
pub mod batch_job_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage batch jobs."]
#[derive(Debug, Clone)]
pub struct BatchJobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> BatchJobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BatchJobServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
BatchJobServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Mutates a batch job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn mutate_batch_job(
&mut self,
request: impl tonic::IntoRequest<super::MutateBatchJobRequest>,
) -> Result<tonic::Response<super::MutateBatchJobResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BatchJobService/MutateBatchJob",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the batch job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_batch_job(
&mut self,
request: impl tonic::IntoRequest<super::GetBatchJobRequest>,
) -> Result<tonic::Response<super::super::resources::BatchJob>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BatchJobService/GetBatchJob",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the results of the batch job. The job must be done."]
#[doc = " Supports standard list paging."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BatchJobError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_batch_job_results(
&mut self,
request: impl tonic::IntoRequest<super::ListBatchJobResultsRequest>,
) -> Result<tonic::Response<super::ListBatchJobResultsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BatchJobService/ListBatchJobResults",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Runs the batch job."]
#[doc = ""]
#[doc = " The Operation.metadata field type is BatchJobMetadata. When finished, the"]
#[doc = " long running operation will not contain errors or a response. Instead, use"]
#[doc = " ListBatchJobResults to get the results of the job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BatchJobError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn run_batch_job(
&mut self,
request: impl tonic::IntoRequest<super::RunBatchJobRequest>,
) -> Result<
tonic::Response<super::super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BatchJobService/RunBatchJob",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Add operations to the batch job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BatchJobError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [ResourceCountLimitExceededError]()"]
pub async fn add_batch_job_operations(
&mut self,
request: impl tonic::IntoRequest<super::AddBatchJobOperationsRequest>,
) -> Result<tonic::Response<super::AddBatchJobOperationsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BatchJobService/AddBatchJobOperations",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBiddingStrategySimulationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod bidding_strategy_simulation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch bidding strategy simulations."]
#[derive(Debug, Clone)]
pub struct BiddingStrategySimulationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> BiddingStrategySimulationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BiddingStrategySimulationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
BiddingStrategySimulationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested bidding strategy simulation in full detail."]
pub async fn get_bidding_strategy_simulation(
&mut self,
request: impl tonic::IntoRequest<super::GetBiddingStrategySimulationRequest>,
) -> Result<
tonic::Response<super::super::resources::BiddingStrategySimulation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.BiddingStrategySimulationService/GetBiddingStrategySimulation") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBillingSetupRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBillingSetupRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<BillingSetupOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BillingSetupOperation {
#[prost(oneof = "billing_setup_operation::Operation", tags = "2, 1")]
pub operation: ::core::option::Option<billing_setup_operation::Operation>,
}
pub mod billing_setup_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "2")]
Create(super::super::resources::BillingSetup),
#[prost(string, tag = "1")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBillingSetupResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateBillingSetupResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateBillingSetupResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod billing_setup_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " A service for designating the business entity responsible for accrued costs."]
#[doc = ""]
#[doc = " A billing setup is associated with a payments account. Billing-related"]
#[doc = " activity for all billing setups associated with a particular payments account"]
#[doc = " will appear on a single invoice generated monthly."]
#[doc = ""]
#[doc = " Mutates:"]
#[doc = " The REMOVE operation cancels a pending billing setup."]
#[doc = " The CREATE operation creates a new billing setup."]
#[derive(Debug, Clone)]
pub struct BillingSetupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> BillingSetupServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> BillingSetupServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
BillingSetupServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns a billing setup."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_billing_setup(
&mut self,
request: impl tonic::IntoRequest<super::GetBillingSetupRequest>,
) -> Result<tonic::Response<super::super::resources::BillingSetup>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BillingSetupService/GetBillingSetup",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a billing setup, or cancels an existing billing setup."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [BillingSetupError]()"]
#[doc = " [DateError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_billing_setup(
&mut self,
request: impl tonic::IntoRequest<super::MutateBillingSetupRequest>,
) -> Result<tonic::Response<super::MutateBillingSetupResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.BillingSetupService/MutateBillingSetup",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignAudienceViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_audience_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage campaign audience views."]
#[derive(Debug, Clone)]
pub struct CampaignAudienceViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignAudienceViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignAudienceViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignAudienceViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign audience view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_audience_view(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignAudienceViewRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignAudienceView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignAudienceViewService/GetCampaignAudienceView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignCriterionSimulationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_criterion_simulation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch campaign criterion simulations."]
#[derive(Debug, Clone)]
pub struct CampaignCriterionSimulationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignCriterionSimulationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignCriterionSimulationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignCriterionSimulationServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign criterion simulation in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_campaign_criterion_simulation(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignCriterionSimulationRequest>,
) -> Result<
tonic::Response<super::super::resources::CampaignCriterionSimulation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CampaignCriterionSimulationService/GetCampaignCriterionSimulation") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCampaignSimulationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod campaign_simulation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch campaign simulations."]
#[derive(Debug, Clone)]
pub struct CampaignSimulationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CampaignSimulationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CampaignSimulationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CampaignSimulationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested campaign simulation in full detail."]
pub async fn get_campaign_simulation(
&mut self,
request: impl tonic::IntoRequest<super::GetCampaignSimulationRequest>,
) -> Result<tonic::Response<super::super::resources::CampaignSimulation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CampaignSimulationService/GetCampaignSimulation",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCarrierConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod carrier_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch carrier constants."]
#[derive(Debug, Clone)]
pub struct CarrierConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CarrierConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CarrierConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CarrierConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested carrier constant in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_carrier_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetCarrierConstantRequest>,
) -> Result<tonic::Response<super::super::resources::CarrierConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CarrierConstantService/GetCarrierConstant",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChangeStatusRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod change_status_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch change statuses."]
#[derive(Debug, Clone)]
pub struct ChangeStatusServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ChangeStatusServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ChangeStatusServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ChangeStatusServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested change status in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_change_status(
&mut self,
request: impl tonic::IntoRequest<super::GetChangeStatusRequest>,
) -> Result<tonic::Response<super::super::resources::ChangeStatus>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ChangeStatusService/GetChangeStatus",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClickViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod click_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch click views."]
#[derive(Debug, Clone)]
pub struct ClickViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ClickViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ClickViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ClickViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested click view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_click_view(
&mut self,
request: impl tonic::IntoRequest<super::GetClickViewRequest>,
) -> Result<tonic::Response<super::super::resources::ClickView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ClickViewService/GetClickView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCombinedAudienceRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod combined_audience_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage combined audiences. This service can be used to list all"]
#[doc = " your combined audiences with metadata, but won't show the structure and"]
#[doc = " components of the combined audience."]
#[derive(Debug, Clone)]
pub struct CombinedAudienceServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CombinedAudienceServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CombinedAudienceServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CombinedAudienceServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested combined audience in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_combined_audience(
&mut self,
request: impl tonic::IntoRequest<super::GetCombinedAudienceRequest>,
) -> Result<tonic::Response<super::super::resources::CombinedAudience>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CombinedAudienceService/GetCombinedAudience",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadConversionAdjustmentsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub conversion_adjustments: ::prost::alloc::vec::Vec<ConversionAdjustment>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadConversionAdjustmentsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<ConversionAdjustmentResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionAdjustment {
#[prost(string, optional, tag = "8")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub adjustment_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "super::enums::conversion_adjustment_type_enum::ConversionAdjustmentType",
tag = "5"
)]
pub adjustment_type: i32,
#[prost(message, optional, tag = "6")]
pub restatement_value: ::core::option::Option<RestatementValue>,
#[prost(oneof = "conversion_adjustment::ConversionIdentifier", tags = "1, 7")]
pub conversion_identifier: ::core::option::Option<conversion_adjustment::ConversionIdentifier>,
}
pub mod conversion_adjustment {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConversionIdentifier {
#[prost(message, tag = "1")]
GclidDateTimePair(super::GclidDateTimePair),
#[prost(string, tag = "7")]
OrderId(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestatementValue {
#[prost(double, optional, tag = "3")]
pub adjusted_value: ::core::option::Option<f64>,
#[prost(string, optional, tag = "4")]
pub currency_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GclidDateTimePair {
#[prost(string, optional, tag = "3")]
pub gclid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub conversion_date_time: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversionAdjustmentResult {
#[prost(string, optional, tag = "7")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub adjustment_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "super::enums::conversion_adjustment_type_enum::ConversionAdjustmentType",
tag = "5"
)]
pub adjustment_type: i32,
#[prost(oneof = "conversion_adjustment_result::ConversionIdentifier", tags = "1, 6")]
pub conversion_identifier:
::core::option::Option<conversion_adjustment_result::ConversionIdentifier>,
}
pub mod conversion_adjustment_result {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ConversionIdentifier {
#[prost(message, tag = "1")]
GclidDateTimePair(super::GclidDateTimePair),
#[prost(string, tag = "6")]
OrderId(::prost::alloc::string::String),
}
}
#[doc = r" Generated client implementations."]
pub mod conversion_adjustment_upload_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to upload conversion adjustments."]
#[derive(Debug, Clone)]
pub struct ConversionAdjustmentUploadServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ConversionAdjustmentUploadServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ConversionAdjustmentUploadServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ConversionAdjustmentUploadServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Processes the given conversion adjustments."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [PartialFailureError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn upload_conversion_adjustments(
&mut self,
request: impl tonic::IntoRequest<super::UploadConversionAdjustmentsRequest>,
) -> Result<tonic::Response<super::UploadConversionAdjustmentsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ConversionAdjustmentUploadService/UploadConversionAdjustments") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadClickConversionsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub conversions: ::prost::alloc::vec::Vec<ClickConversion>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadClickConversionsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<ClickConversionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadCallConversionsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub conversions: ::prost::alloc::vec::Vec<CallConversion>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadCallConversionsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<CallConversionResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClickConversion {
#[prost(string, optional, tag = "9")]
pub gclid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "11")]
pub conversion_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "12")]
pub conversion_value: ::core::option::Option<f64>,
#[prost(string, optional, tag = "13")]
pub currency_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "14")]
pub order_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub external_attribution_data: ::core::option::Option<ExternalAttributionData>,
#[prost(message, repeated, tag = "15")]
pub custom_variables: ::prost::alloc::vec::Vec<CustomVariable>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallConversion {
#[prost(string, optional, tag = "7")]
pub caller_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub call_start_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub conversion_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(double, optional, tag = "11")]
pub conversion_value: ::core::option::Option<f64>,
#[prost(string, optional, tag = "12")]
pub currency_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "13")]
pub custom_variables: ::prost::alloc::vec::Vec<CustomVariable>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalAttributionData {
#[prost(double, optional, tag = "3")]
pub external_attribution_credit: ::core::option::Option<f64>,
#[prost(string, optional, tag = "4")]
pub external_attribution_model: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClickConversionResult {
#[prost(string, optional, tag = "4")]
pub gclid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub conversion_date_time: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallConversionResult {
#[prost(string, optional, tag = "5")]
pub caller_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub call_start_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub conversion_action: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub conversion_date_time: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomVariable {
#[prost(string, tag = "1")]
pub conversion_custom_variable: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod conversion_upload_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to upload conversions."]
#[derive(Debug, Clone)]
pub struct ConversionUploadServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ConversionUploadServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ConversionUploadServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ConversionUploadServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Processes the given click conversions."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [ConversionUploadError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [PartialFailureError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn upload_click_conversions(
&mut self,
request: impl tonic::IntoRequest<super::UploadClickConversionsRequest>,
) -> Result<tonic::Response<super::UploadClickConversionsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ConversionUploadService/UploadClickConversions",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Processes the given call conversions."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [PartialFailureError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn upload_call_conversions(
&mut self,
request: impl tonic::IntoRequest<super::UploadCallConversionsRequest>,
) -> Result<tonic::Response<super::UploadCallConversionsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ConversionUploadService/UploadCallConversions",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCurrencyConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod currency_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch currency constants."]
#[derive(Debug, Clone)]
pub struct CurrencyConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CurrencyConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CurrencyConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CurrencyConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested currency constant."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_currency_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetCurrencyConstantRequest>,
) -> Result<tonic::Response<super::super::resources::CurrencyConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CurrencyConstantService/GetCurrencyConstant",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomAudienceRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomAudiencesRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomAudienceOperation>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomAudienceOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "custom_audience_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<custom_audience_operation::Operation>,
}
pub mod custom_audience_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomAudience),
#[prost(message, tag = "2")]
Update(super::super::resources::CustomAudience),
#[prost(string, tag = "3")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomAudiencesResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<MutateCustomAudienceResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomAudienceResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod custom_audience_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage custom audiences."]
#[derive(Debug, Clone)]
pub struct CustomAudienceServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomAudienceServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomAudienceServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomAudienceServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested custom audience in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_custom_audience(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomAudienceRequest>,
) -> Result<tonic::Response<super::super::resources::CustomAudience>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomAudienceService/GetCustomAudience",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates custom audiences. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CustomAudienceError]()"]
#[doc = " [CustomInterestError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [OperationAccessDeniedError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_custom_audiences(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomAudiencesRequest>,
) -> Result<tonic::Response<super::MutateCustomAudiencesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomAudienceService/MutateCustomAudiences",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomInterestRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomInterestsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomInterestOperation>,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomInterestOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "custom_interest_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<custom_interest_operation::Operation>,
}
pub mod custom_interest_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomInterest),
#[prost(message, tag = "2")]
Update(super::super::resources::CustomInterest),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomInterestsResponse {
#[prost(message, repeated, tag = "2")]
pub results: ::prost::alloc::vec::Vec<MutateCustomInterestResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomInterestResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod custom_interest_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage custom interests."]
#[derive(Debug, Clone)]
pub struct CustomInterestServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomInterestServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomInterestServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomInterestServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested custom interest in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_custom_interest(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomInterestRequest>,
) -> Result<tonic::Response<super::super::resources::CustomInterest>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomInterestService/GetCustomInterest",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates custom interests. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CriterionError]()"]
#[doc = " [CustomInterestError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [PolicyViolationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [StringLengthError]()"]
pub async fn mutate_custom_interests(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomInterestsRequest>,
) -> Result<tonic::Response<super::MutateCustomInterestsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomInterestService/MutateCustomInterests",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerClientLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerClientLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<CustomerClientLinkOperation>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerClientLinkOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_client_link_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<customer_client_link_operation::Operation>,
}
pub mod customer_client_link_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerClientLink),
#[prost(message, tag = "2")]
Update(super::super::resources::CustomerClientLink),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerClientLinkResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateCustomerClientLinkResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerClientLinkResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_client_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer client links."]
#[derive(Debug, Clone)]
pub struct CustomerClientLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerClientLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerClientLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerClientLinkServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested CustomerClientLink in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_client_link(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerClientLinkRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerClientLink>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerClientLinkService/GetCustomerClientLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates a customer client link. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ManagerLinkError]()"]
#[doc = " [MutateError]()"]
#[doc = " [NewResourceCreationError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_client_link(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerClientLinkRequest>,
) -> Result<tonic::Response<super::MutateCustomerClientLinkResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerClientLinkService/MutateCustomerClientLink") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerClientRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_client_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to get clients in a customer's hierarchy."]
#[derive(Debug, Clone)]
pub struct CustomerClientServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerClientServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerClientServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerClientServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested client in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_client(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerClientRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerClient>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerClientService/GetCustomerClient",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerManagerLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerManagerLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<CustomerManagerLinkOperation>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveManagerLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub previous_customer_manager_link: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub new_manager: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerManagerLinkOperation {
#[prost(message, optional, tag = "4")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_manager_link_operation::Operation", tags = "2")]
pub operation: ::core::option::Option<customer_manager_link_operation::Operation>,
}
pub mod customer_manager_link_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "2")]
Update(super::super::resources::CustomerManagerLink),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerManagerLinkResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<MutateCustomerManagerLinkResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveManagerLinkResponse {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerManagerLinkResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_manager_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage customer-manager links."]
#[derive(Debug, Clone)]
pub struct CustomerManagerLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerManagerLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerManagerLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerManagerLinkServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested CustomerManagerLink in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_manager_link(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerManagerLinkRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerManagerLink>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerManagerLinkService/GetCustomerManagerLink") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or updates customer manager links. Operation statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [ManagerLinkError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_manager_link(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerManagerLinkRequest>,
) -> Result<tonic::Response<super::MutateCustomerManagerLinkResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerManagerLinkService/MutateCustomerManagerLink") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Moves a client customer to a new manager customer."]
#[doc = " This simplifies the complex request that requires two operations to move"]
#[doc = " a client customer to a new manager. i.e:"]
#[doc = " 1. Update operation with Status INACTIVE (previous manager) and,"]
#[doc = " 2. Update operation with Status ACTIVE (new manager)."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn move_manager_link(
&mut self,
request: impl tonic::IntoRequest<super::MoveManagerLinkRequest>,
) -> Result<tonic::Response<super::MoveManagerLinkResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerManagerLinkService/MoveManagerLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerUserAccessInvitationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessInvitationRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<CustomerUserAccessInvitationOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerUserAccessInvitationOperation {
#[prost(oneof = "customer_user_access_invitation_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<customer_user_access_invitation_operation::Operation>,
}
pub mod customer_user_access_invitation_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::resources::CustomerUserAccessInvitation),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessInvitationResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateCustomerUserAccessInvitationResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessInvitationResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_user_access_invitation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service manages the access invitation extended to users for a given"]
#[doc = " customer."]
#[derive(Debug, Clone)]
pub struct CustomerUserAccessInvitationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerUserAccessInvitationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerUserAccessInvitationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerUserAccessInvitationServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested access invitation in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_user_access_invitation(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerUserAccessInvitationRequest>,
) -> Result<
tonic::Response<super::super::resources::CustomerUserAccessInvitation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerUserAccessInvitationService/GetCustomerUserAccessInvitation") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates or removes an access invitation."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AccessInvitationError]()"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_user_access_invitation(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerUserAccessInvitationRequest>,
) -> Result<tonic::Response<super::MutateCustomerUserAccessInvitationResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerUserAccessInvitationService/MutateCustomerUserAccessInvitation") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCustomerUserAccessRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<CustomerUserAccessOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CustomerUserAccessOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "customer_user_access_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<customer_user_access_operation::Operation>,
}
pub mod customer_user_access_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Update(super::super::resources::CustomerUserAccess),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessResponse {
#[prost(message, optional, tag = "1")]
pub result: ::core::option::Option<MutateCustomerUserAccessResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateCustomerUserAccessResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod customer_user_access_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service manages the permissions of a user on a given customer."]
#[derive(Debug, Clone)]
pub struct CustomerUserAccessServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CustomerUserAccessServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CustomerUserAccessServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
CustomerUserAccessServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the CustomerUserAccess in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_customer_user_access(
&mut self,
request: impl tonic::IntoRequest<super::GetCustomerUserAccessRequest>,
) -> Result<tonic::Response<super::super::resources::CustomerUserAccess>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.CustomerUserAccessService/GetCustomerUserAccess",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates, removes permission of a user on a given customer. Operation"]
#[doc = " statuses are returned."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CustomerUserAccessError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_customer_user_access(
&mut self,
request: impl tonic::IntoRequest<super::MutateCustomerUserAccessRequest>,
) -> Result<tonic::Response<super::MutateCustomerUserAccessResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.CustomerUserAccessService/MutateCustomerUserAccess") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDetailPlacementViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod detail_placement_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Detail Placement views."]
#[derive(Debug, Clone)]
pub struct DetailPlacementViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DetailPlacementViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DetailPlacementViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DetailPlacementViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Detail Placement view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_detail_placement_view(
&mut self,
request: impl tonic::IntoRequest<super::GetDetailPlacementViewRequest>,
) -> Result<tonic::Response<super::super::resources::DetailPlacementView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.DetailPlacementViewService/GetDetailPlacementView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDisplayKeywordViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod display_keyword_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage display keyword views."]
#[derive(Debug, Clone)]
pub struct DisplayKeywordViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DisplayKeywordViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DisplayKeywordViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DisplayKeywordViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested display keyword view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_display_keyword_view(
&mut self,
request: impl tonic::IntoRequest<super::GetDisplayKeywordViewRequest>,
) -> Result<tonic::Response<super::super::resources::DisplayKeywordView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.DisplayKeywordViewService/GetDisplayKeywordView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDistanceViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod distance_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch distance views."]
#[derive(Debug, Clone)]
pub struct DistanceViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DistanceViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DistanceViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DistanceViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the attributes of the requested distance view."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_distance_view(
&mut self,
request: impl tonic::IntoRequest<super::GetDistanceViewRequest>,
) -> Result<tonic::Response<super::super::resources::DistanceView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.DistanceViewService/GetDistanceView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDomainCategoryRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod domain_category_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch domain categories."]
#[derive(Debug, Clone)]
pub struct DomainCategoryServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DomainCategoryServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DomainCategoryServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DomainCategoryServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested domain category."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_domain_category(
&mut self,
request: impl tonic::IntoRequest<super::GetDomainCategoryRequest>,
) -> Result<tonic::Response<super::super::resources::DomainCategory>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.DomainCategoryService/GetDomainCategory",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDynamicSearchAdsSearchTermViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod dynamic_search_ads_search_term_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch dynamic search ads views."]
#[derive(Debug, Clone)]
pub struct DynamicSearchAdsSearchTermViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DynamicSearchAdsSearchTermViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DynamicSearchAdsSearchTermViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DynamicSearchAdsSearchTermViewServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested dynamic search ads search term view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_dynamic_search_ads_search_term_view(
&mut self,
request: impl tonic::IntoRequest<super::GetDynamicSearchAdsSearchTermViewRequest>,
) -> Result<
tonic::Response<super::super::resources::DynamicSearchAdsSearchTermView>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.DynamicSearchAdsSearchTermViewService/GetDynamicSearchAdsSearchTermView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetExpandedLandingPageViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod expanded_landing_page_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch expanded landing page views."]
#[derive(Debug, Clone)]
pub struct ExpandedLandingPageViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ExpandedLandingPageViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ExpandedLandingPageViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ExpandedLandingPageViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested expanded landing page view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_expanded_landing_page_view(
&mut self,
request: impl tonic::IntoRequest<super::GetExpandedLandingPageViewRequest>,
) -> Result<tonic::Response<super::super::resources::ExpandedLandingPageView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ExpandedLandingPageViewService/GetExpandedLandingPageView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFeedPlaceholderViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod feed_placeholder_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch feed placeholder views."]
#[derive(Debug, Clone)]
pub struct FeedPlaceholderViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FeedPlaceholderViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FeedPlaceholderViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
FeedPlaceholderViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested feed placeholder view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_feed_placeholder_view(
&mut self,
request: impl tonic::IntoRequest<super::GetFeedPlaceholderViewRequest>,
) -> Result<tonic::Response<super::super::resources::FeedPlaceholderView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.FeedPlaceholderViewService/GetFeedPlaceholderView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGenderViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod gender_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage gender views."]
#[derive(Debug, Clone)]
pub struct GenderViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GenderViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GenderViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GenderViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested gender view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_gender_view(
&mut self,
request: impl tonic::IntoRequest<super::GetGenderViewRequest>,
) -> Result<tonic::Response<super::super::resources::GenderView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GenderViewService/GetGenderView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGeoTargetConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuggestGeoTargetConstantsRequest {
#[prost(string, optional, tag = "6")]
pub locale: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub country_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(oneof = "suggest_geo_target_constants_request::Query", tags = "1, 2")]
pub query: ::core::option::Option<suggest_geo_target_constants_request::Query>,
}
pub mod suggest_geo_target_constants_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationNames {
#[prost(string, repeated, tag = "2")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoTargets {
#[prost(string, repeated, tag = "2")]
pub geo_target_constants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Query {
#[prost(message, tag = "1")]
LocationNames(LocationNames),
#[prost(message, tag = "2")]
GeoTargets(GeoTargets),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuggestGeoTargetConstantsResponse {
#[prost(message, repeated, tag = "1")]
pub geo_target_constant_suggestions: ::prost::alloc::vec::Vec<GeoTargetConstantSuggestion>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeoTargetConstantSuggestion {
#[prost(string, optional, tag = "6")]
pub locale: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "7")]
pub reach: ::core::option::Option<i64>,
#[prost(string, optional, tag = "8")]
pub search_term: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub geo_target_constant: ::core::option::Option<super::resources::GeoTargetConstant>,
#[prost(message, repeated, tag = "5")]
pub geo_target_constant_parents: ::prost::alloc::vec::Vec<super::resources::GeoTargetConstant>,
}
#[doc = r" Generated client implementations."]
pub mod geo_target_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch geo target constants."]
#[derive(Debug, Clone)]
pub struct GeoTargetConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GeoTargetConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GeoTargetConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GeoTargetConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested geo target constant in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_geo_target_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetGeoTargetConstantRequest>,
) -> Result<tonic::Response<super::super::resources::GeoTargetConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GeoTargetConstantService/GetGeoTargetConstant",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns GeoTargetConstant suggestions by location name or by resource name."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [GeoTargetConstantSuggestionError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn suggest_geo_target_constants(
&mut self,
request: impl tonic::IntoRequest<super::SuggestGeoTargetConstantsRequest>,
) -> Result<tonic::Response<super::SuggestGeoTargetConstantsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.GeoTargetConstantService/SuggestGeoTargetConstants") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGeographicViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod geographic_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage geographic views."]
#[derive(Debug, Clone)]
pub struct GeographicViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GeographicViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GeographicViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GeographicViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested geographic view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_geographic_view(
&mut self,
request: impl tonic::IntoRequest<super::GetGeographicViewRequest>,
) -> Result<tonic::Response<super::super::resources::GeographicView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GeographicViewService/GetGeographicView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGoogleAdsFieldRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsFieldsRequest {
#[prost(string, tag = "1")]
pub query: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchGoogleAdsFieldsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<super::resources::GoogleAdsField>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub total_results_count: i64,
}
#[doc = r" Generated client implementations."]
pub mod google_ads_field_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Google Ads API fields."]
#[derive(Debug, Clone)]
pub struct GoogleAdsFieldServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GoogleAdsFieldServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GoogleAdsFieldServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GoogleAdsFieldServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns just the requested field."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_google_ads_field(
&mut self,
request: impl tonic::IntoRequest<super::GetGoogleAdsFieldRequest>,
) -> Result<tonic::Response<super::super::resources::GoogleAdsField>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GoogleAdsFieldService/GetGoogleAdsField",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns all fields that match the search query."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QueryError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn search_google_ads_fields(
&mut self,
request: impl tonic::IntoRequest<super::SearchGoogleAdsFieldsRequest>,
) -> Result<tonic::Response<super::SearchGoogleAdsFieldsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GoogleAdsFieldService/SearchGoogleAdsFields",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetGroupPlacementViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod group_placement_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Group Placement views."]
#[derive(Debug, Clone)]
pub struct GroupPlacementViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> GroupPlacementViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GroupPlacementViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
GroupPlacementViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Group Placement view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_group_placement_view(
&mut self,
request: impl tonic::IntoRequest<super::GetGroupPlacementViewRequest>,
) -> Result<tonic::Response<super::super::resources::GroupPlacementView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.GroupPlacementViewService/GetGroupPlacementView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHotelGroupViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod hotel_group_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Hotel Group Views."]
#[derive(Debug, Clone)]
pub struct HotelGroupViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> HotelGroupViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HotelGroupViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
HotelGroupViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Hotel Group View in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_hotel_group_view(
&mut self,
request: impl tonic::IntoRequest<super::GetHotelGroupViewRequest>,
) -> Result<tonic::Response<super::super::resources::HotelGroupView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.HotelGroupViewService/GetHotelGroupView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHotelPerformanceViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod hotel_performance_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Hotel Performance Views."]
#[derive(Debug, Clone)]
pub struct HotelPerformanceViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> HotelPerformanceViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HotelPerformanceViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
HotelPerformanceViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Hotel Performance View in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_hotel_performance_view(
&mut self,
request: impl tonic::IntoRequest<super::GetHotelPerformanceViewRequest>,
) -> Result<tonic::Response<super::super::resources::HotelPerformanceView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.HotelPerformanceViewService/GetHotelPerformanceView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIncomeRangeViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod income_range_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage income range views."]
#[derive(Debug, Clone)]
pub struct IncomeRangeViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> IncomeRangeViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> IncomeRangeViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
IncomeRangeViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested income range view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_income_range_view(
&mut self,
request: impl tonic::IntoRequest<super::GetIncomeRangeViewRequest>,
) -> Result<tonic::Response<super::super::resources::IncomeRangeView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.IncomeRangeViewService/GetIncomeRangeView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoicesRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub billing_setup: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub issue_year: ::prost::alloc::string::String,
#[prost(enumeration = "super::enums::month_of_year_enum::MonthOfYear", tag = "4")]
pub issue_month: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoicesResponse {
#[prost(message, repeated, tag = "1")]
pub invoices: ::prost::alloc::vec::Vec<super::resources::Invoice>,
}
#[doc = r" Generated client implementations."]
pub mod invoice_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " A service to fetch invoices issued for a billing setup during a given month."]
#[derive(Debug, Clone)]
pub struct InvoiceServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> InvoiceServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InvoiceServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
InvoiceServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns all invoices associated with a billing setup, for a given month."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [InvoiceError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_invoices(
&mut self,
request: impl tonic::IntoRequest<super::ListInvoicesRequest>,
) -> Result<tonic::Response<super::ListInvoicesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.InvoiceService/ListInvoices",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateKeywordIdeasRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "14")]
pub language: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "15")]
pub geo_target_constants: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "10")]
pub include_adult_keywords: bool,
#[prost(string, tag = "12")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "13")]
pub page_size: i32,
#[prost(
enumeration = "super::enums::keyword_plan_network_enum::KeywordPlanNetwork",
tag = "9"
)]
pub keyword_plan_network: i32,
#[prost(
enumeration = "super::enums::keyword_plan_keyword_annotation_enum::KeywordPlanKeywordAnnotation",
repeated,
tag = "17"
)]
pub keyword_annotation: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "16")]
pub aggregate_metrics: ::core::option::Option<super::common::KeywordPlanAggregateMetrics>,
#[prost(message, optional, tag = "18")]
pub historical_metrics_options: ::core::option::Option<super::common::HistoricalMetricsOptions>,
#[prost(oneof = "generate_keyword_ideas_request::Seed", tags = "2, 3, 5, 11")]
pub seed: ::core::option::Option<generate_keyword_ideas_request::Seed>,
}
pub mod generate_keyword_ideas_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Seed {
#[prost(message, tag = "2")]
KeywordAndUrlSeed(super::KeywordAndUrlSeed),
#[prost(message, tag = "3")]
KeywordSeed(super::KeywordSeed),
#[prost(message, tag = "5")]
UrlSeed(super::UrlSeed),
#[prost(message, tag = "11")]
SiteSeed(super::SiteSeed),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordAndUrlSeed {
#[prost(string, optional, tag = "3")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub keywords: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordSeed {
#[prost(string, repeated, tag = "2")]
pub keywords: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SiteSeed {
#[prost(string, optional, tag = "2")]
pub site: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UrlSeed {
#[prost(string, optional, tag = "2")]
pub url: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateKeywordIdeaResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<GenerateKeywordIdeaResult>,
#[prost(message, optional, tag = "4")]
pub aggregate_metric_results:
::core::option::Option<super::common::KeywordPlanAggregateMetricResults>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub total_size: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateKeywordIdeaResult {
#[prost(string, optional, tag = "5")]
pub text: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub keyword_idea_metrics: ::core::option::Option<super::common::KeywordPlanHistoricalMetrics>,
#[prost(message, optional, tag = "6")]
pub keyword_annotations: ::core::option::Option<super::common::KeywordAnnotations>,
}
#[doc = r" Generated client implementations."]
pub mod keyword_plan_idea_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to generate keyword ideas."]
#[derive(Debug, Clone)]
pub struct KeywordPlanIdeaServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordPlanIdeaServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordPlanIdeaServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordPlanIdeaServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns a list of keyword ideas."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [KeywordPlanIdeaError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_keyword_ideas(
&mut self,
request: impl tonic::IntoRequest<super::GenerateKeywordIdeasRequest>,
) -> Result<tonic::Response<super::GenerateKeywordIdeaResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordPlanIdeaService/GenerateKeywordIdeas",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetKeywordViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod keyword_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage keyword views."]
#[derive(Debug, Clone)]
pub struct KeywordViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> KeywordViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KeywordViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
KeywordViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested keyword view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_keyword_view(
&mut self,
request: impl tonic::IntoRequest<super::GetKeywordViewRequest>,
) -> Result<tonic::Response<super::super::resources::KeywordView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.KeywordViewService/GetKeywordView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLandingPageViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod landing_page_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch landing page views."]
#[derive(Debug, Clone)]
pub struct LandingPageViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> LandingPageViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> LandingPageViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
LandingPageViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested landing page view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_landing_page_view(
&mut self,
request: impl tonic::IntoRequest<super::GetLandingPageViewRequest>,
) -> Result<tonic::Response<super::super::resources::LandingPageView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LandingPageViewService/GetLandingPageView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLanguageConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod language_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch language constants."]
#[derive(Debug, Clone)]
pub struct LanguageConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> LanguageConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> LanguageConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
LanguageConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested language constant."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_language_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetLanguageConstantRequest>,
) -> Result<tonic::Response<super::super::resources::LanguageConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LanguageConstantService/GetLanguageConstant",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLifeEventRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod life_event_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Google Ads Life Events."]
#[derive(Debug, Clone)]
pub struct LifeEventServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> LifeEventServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> LifeEventServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
LifeEventServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested life event in full detail."]
pub async fn get_life_event(
&mut self,
request: impl tonic::IntoRequest<super::GetLifeEventRequest>,
) -> Result<tonic::Response<super::super::resources::LifeEvent>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LifeEventService/GetLifeEvent",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLocationViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod location_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch location views."]
#[derive(Debug, Clone)]
pub struct LocationViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> LocationViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> LocationViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
LocationViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested location view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_location_view(
&mut self,
request: impl tonic::IntoRequest<super::GetLocationViewRequest>,
) -> Result<tonic::Response<super::super::resources::LocationView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.LocationViewService/GetLocationView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetManagedPlacementViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod managed_placement_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage Managed Placement views."]
#[derive(Debug, Clone)]
pub struct ManagedPlacementViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ManagedPlacementViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ManagedPlacementViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ManagedPlacementViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Managed Placement view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_managed_placement_view(
&mut self,
request: impl tonic::IntoRequest<super::GetManagedPlacementViewRequest>,
) -> Result<tonic::Response<super::super::resources::ManagedPlacementView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ManagedPlacementViewService/GetManagedPlacementView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMerchantCenterLinksRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMerchantCenterLinksResponse {
#[prost(message, repeated, tag = "1")]
pub merchant_center_links: ::prost::alloc::vec::Vec<super::resources::MerchantCenterLink>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMerchantCenterLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMerchantCenterLinkRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation: ::core::option::Option<MerchantCenterLinkOperation>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MerchantCenterLinkOperation {
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(oneof = "merchant_center_link_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<merchant_center_link_operation::Operation>,
}
pub mod merchant_center_link_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Update(super::super::resources::MerchantCenterLink),
#[prost(string, tag = "2")]
Remove(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMerchantCenterLinkResponse {
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<MutateMerchantCenterLinkResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutateMerchantCenterLinkResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod merchant_center_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service allows management of links between Google Ads and Google"]
#[doc = " Merchant Center."]
#[derive(Debug, Clone)]
pub struct MerchantCenterLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MerchantCenterLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MerchantCenterLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MerchantCenterLinkServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns Merchant Center links available for this customer."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_merchant_center_links(
&mut self,
request: impl tonic::IntoRequest<super::ListMerchantCenterLinksRequest>,
) -> Result<tonic::Response<super::ListMerchantCenterLinksResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.MerchantCenterLinkService/ListMerchantCenterLinks") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the Merchant Center link in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_merchant_center_link(
&mut self,
request: impl tonic::IntoRequest<super::GetMerchantCenterLinkRequest>,
) -> Result<tonic::Response<super::super::resources::MerchantCenterLink>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.MerchantCenterLinkService/GetMerchantCenterLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates status or removes a Merchant Center link."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [FieldMaskError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn mutate_merchant_center_link(
&mut self,
request: impl tonic::IntoRequest<super::MutateMerchantCenterLinkRequest>,
) -> Result<tonic::Response<super::MutateMerchantCenterLinkResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.MerchantCenterLinkService/MutateMerchantCenterLink") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMobileAppCategoryConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod mobile_app_category_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch mobile app category constants."]
#[derive(Debug, Clone)]
pub struct MobileAppCategoryConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MobileAppCategoryConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MobileAppCategoryConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MobileAppCategoryConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested mobile app category constant."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_mobile_app_category_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetMobileAppCategoryConstantRequest>,
) -> Result<
tonic::Response<super::super::resources::MobileAppCategoryConstant>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.MobileAppCategoryConstantService/GetMobileAppCategoryConstant") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMobileDeviceConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod mobile_device_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch mobile device constants."]
#[derive(Debug, Clone)]
pub struct MobileDeviceConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MobileDeviceConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MobileDeviceConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MobileDeviceConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested mobile device constant in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_mobile_device_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetMobileDeviceConstantRequest>,
) -> Result<tonic::Response<super::super::resources::MobileDeviceConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.MobileDeviceConstantService/GetMobileDeviceConstant") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOfflineUserDataJobRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub job: ::core::option::Option<super::resources::OfflineUserDataJob>,
#[prost(bool, tag = "3")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOfflineUserDataJobResponse {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOfflineUserDataJobRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunOfflineUserDataJobRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddOfflineUserDataJobOperationsRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "4")]
pub enable_partial_failure: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "3")]
pub operations: ::prost::alloc::vec::Vec<OfflineUserDataJobOperation>,
#[prost(bool, tag = "5")]
pub validate_only: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OfflineUserDataJobOperation {
#[prost(oneof = "offline_user_data_job_operation::Operation", tags = "1, 2, 3")]
pub operation: ::core::option::Option<offline_user_data_job_operation::Operation>,
}
pub mod offline_user_data_job_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::common::UserData),
#[prost(message, tag = "2")]
Remove(super::super::common::UserData),
#[prost(bool, tag = "3")]
RemoveAll(bool),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddOfflineUserDataJobOperationsResponse {
#[prost(message, optional, tag = "1")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
}
#[doc = r" Generated client implementations."]
pub mod offline_user_data_job_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage offline user data jobs."]
#[derive(Debug, Clone)]
pub struct OfflineUserDataJobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> OfflineUserDataJobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> OfflineUserDataJobServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
OfflineUserDataJobServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Creates an offline user data job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [NotAllowlistedError]()"]
#[doc = " [OfflineUserDataJobError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn create_offline_user_data_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateOfflineUserDataJobRequest>,
) -> Result<tonic::Response<super::CreateOfflineUserDataJobResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.OfflineUserDataJobService/CreateOfflineUserDataJob") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the offline user data job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_offline_user_data_job(
&mut self,
request: impl tonic::IntoRequest<super::GetOfflineUserDataJobRequest>,
) -> Result<tonic::Response<super::super::resources::OfflineUserDataJob>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.OfflineUserDataJobService/GetOfflineUserDataJob",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Adds operations to the offline user data job."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [OfflineUserDataJobError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn add_offline_user_data_job_operations(
&mut self,
request: impl tonic::IntoRequest<super::AddOfflineUserDataJobOperationsRequest>,
) -> Result<tonic::Response<super::AddOfflineUserDataJobOperationsResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.OfflineUserDataJobService/AddOfflineUserDataJobOperations") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Runs the offline user data job."]
#[doc = ""]
#[doc = " When finished, the long running operation will contain the processing"]
#[doc = " result or failure information, if any."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [OfflineUserDataJobError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn run_offline_user_data_job(
&mut self,
request: impl tonic::IntoRequest<super::RunOfflineUserDataJobRequest>,
) -> Result<
tonic::Response<super::super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.OfflineUserDataJobService/RunOfflineUserDataJob",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOperatingSystemVersionConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod operating_system_version_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Operating System Version constants."]
#[derive(Debug, Clone)]
pub struct OperatingSystemVersionConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> OperatingSystemVersionConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> OperatingSystemVersionConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
OperatingSystemVersionConstantServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested OS version constant in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_operating_system_version_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetOperatingSystemVersionConstantRequest>,
) -> Result<
tonic::Response<super::super::resources::OperatingSystemVersionConstant>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.OperatingSystemVersionConstantService/GetOperatingSystemVersionConstant") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPaidOrganicSearchTermViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod paid_organic_search_term_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch paid organic search term views."]
#[derive(Debug, Clone)]
pub struct PaidOrganicSearchTermViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> PaidOrganicSearchTermViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PaidOrganicSearchTermViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
PaidOrganicSearchTermViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested paid organic search term view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_paid_organic_search_term_view(
&mut self,
request: impl tonic::IntoRequest<super::GetPaidOrganicSearchTermViewRequest>,
) -> Result<
tonic::Response<super::super::resources::PaidOrganicSearchTermView>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.PaidOrganicSearchTermViewService/GetPaidOrganicSearchTermView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetParentalStatusViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod parental_status_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage parental status views."]
#[derive(Debug, Clone)]
pub struct ParentalStatusViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ParentalStatusViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ParentalStatusViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ParentalStatusViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested parental status view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_parental_status_view(
&mut self,
request: impl tonic::IntoRequest<super::GetParentalStatusViewRequest>,
) -> Result<tonic::Response<super::super::resources::ParentalStatusView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ParentalStatusViewService/GetParentalStatusView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPaymentsAccountsRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPaymentsAccountsResponse {
#[prost(message, repeated, tag = "1")]
pub payments_accounts: ::prost::alloc::vec::Vec<super::resources::PaymentsAccount>,
}
#[doc = r" Generated client implementations."]
pub mod payments_account_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to provide payments accounts that can be used to set up consolidated"]
#[doc = " billing."]
#[derive(Debug, Clone)]
pub struct PaymentsAccountServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> PaymentsAccountServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PaymentsAccountServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
PaymentsAccountServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns all payments accounts associated with all managers"]
#[doc = " between the login customer ID and specified serving customer in the"]
#[doc = " hierarchy, inclusive."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [PaymentsAccountError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_payments_accounts(
&mut self,
request: impl tonic::IntoRequest<super::ListPaymentsAccountsRequest>,
) -> Result<tonic::Response<super::ListPaymentsAccountsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.PaymentsAccountService/ListPaymentsAccounts",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProductBiddingCategoryConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod product_bidding_category_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Product Bidding Categories."]
#[derive(Debug, Clone)]
pub struct ProductBiddingCategoryConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ProductBiddingCategoryConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProductBiddingCategoryConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ProductBiddingCategoryConstantServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Product Bidding Category in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_product_bidding_category_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetProductBiddingCategoryConstantRequest>,
) -> Result<
tonic::Response<super::super::resources::ProductBiddingCategoryConstant>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ProductBiddingCategoryConstantService/GetProductBiddingCategoryConstant") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProductGroupViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod product_group_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage product group views."]
#[derive(Debug, Clone)]
pub struct ProductGroupViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ProductGroupViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProductGroupViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ProductGroupViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested product group view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_product_group_view(
&mut self,
request: impl tonic::IntoRequest<super::GetProductGroupViewRequest>,
) -> Result<tonic::Response<super::super::resources::ProductGroupView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ProductGroupViewService/GetProductGroupView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlannableLocationsRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlannableLocationsResponse {
#[prost(message, repeated, tag = "1")]
pub plannable_locations: ::prost::alloc::vec::Vec<PlannableLocation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlannableLocation {
#[prost(string, optional, tag = "4")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "6")]
pub parent_country_id: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlannableProductsRequest {
#[prost(string, tag = "2")]
pub plannable_location_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlannableProductsResponse {
#[prost(message, repeated, tag = "1")]
pub product_metadata: ::prost::alloc::vec::Vec<ProductMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductMetadata {
#[prost(string, optional, tag = "4")]
pub plannable_product_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub plannable_product_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub plannable_targeting: ::core::option::Option<PlannableTargeting>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlannableTargeting {
#[prost(
enumeration = "super::enums::reach_plan_age_range_enum::ReachPlanAgeRange",
repeated,
tag = "1"
)]
pub age_ranges: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "2")]
pub genders: ::prost::alloc::vec::Vec<super::common::GenderInfo>,
#[prost(message, repeated, tag = "3")]
pub devices: ::prost::alloc::vec::Vec<super::common::DeviceInfo>,
#[prost(
enumeration = "super::enums::reach_plan_network_enum::ReachPlanNetwork",
repeated,
tag = "4"
)]
pub networks: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateProductMixIdeasRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub plannable_location_id: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub currency_code: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub budget_micros: i64,
#[prost(message, optional, tag = "5")]
pub preferences: ::core::option::Option<Preferences>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Preferences {
#[prost(bool, optional, tag = "6")]
pub is_skippable: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "7")]
pub starts_with_sound: ::core::option::Option<bool>,
#[prost(enumeration = "super::enums::reach_plan_ad_length_enum::ReachPlanAdLength", tag = "3")]
pub ad_length: i32,
#[prost(bool, optional, tag = "8")]
pub top_content_only: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "9")]
pub has_guaranteed_price: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateProductMixIdeasResponse {
#[prost(message, repeated, tag = "1")]
pub product_allocation: ::prost::alloc::vec::Vec<ProductAllocation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProductAllocation {
#[prost(string, optional, tag = "3")]
pub plannable_product_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "4")]
pub budget_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateReachForecastRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "9")]
pub currency_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub campaign_duration: ::core::option::Option<CampaignDuration>,
#[prost(int32, optional, tag = "10")]
pub cookie_frequency_cap: ::core::option::Option<i32>,
#[prost(message, optional, tag = "8")]
pub cookie_frequency_cap_setting: ::core::option::Option<FrequencyCap>,
#[prost(int32, optional, tag = "11")]
pub min_effective_frequency: ::core::option::Option<i32>,
#[prost(message, optional, tag = "6")]
pub targeting: ::core::option::Option<Targeting>,
#[prost(message, repeated, tag = "7")]
pub planned_products: ::prost::alloc::vec::Vec<PlannedProduct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FrequencyCap {
#[prost(int32, tag = "3")]
pub impressions: i32,
#[prost(
enumeration = "super::enums::frequency_cap_time_unit_enum::FrequencyCapTimeUnit",
tag = "2"
)]
pub time_unit: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Targeting {
#[prost(string, optional, tag = "6")]
pub plannable_location_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "super::enums::reach_plan_age_range_enum::ReachPlanAgeRange", tag = "2")]
pub age_range: i32,
#[prost(message, repeated, tag = "3")]
pub genders: ::prost::alloc::vec::Vec<super::common::GenderInfo>,
#[prost(message, repeated, tag = "4")]
pub devices: ::prost::alloc::vec::Vec<super::common::DeviceInfo>,
#[prost(enumeration = "super::enums::reach_plan_network_enum::ReachPlanNetwork", tag = "5")]
pub network: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignDuration {
#[prost(int32, optional, tag = "2")]
pub duration_in_days: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlannedProduct {
#[prost(string, optional, tag = "3")]
pub plannable_product_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int64, optional, tag = "4")]
pub budget_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateReachForecastResponse {
#[prost(message, optional, tag = "1")]
pub on_target_audience_metrics: ::core::option::Option<OnTargetAudienceMetrics>,
#[prost(message, optional, tag = "2")]
pub reach_curve: ::core::option::Option<ReachCurve>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReachCurve {
#[prost(message, repeated, tag = "1")]
pub reach_forecasts: ::prost::alloc::vec::Vec<ReachForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReachForecast {
#[prost(int64, tag = "5")]
pub cost_micros: i64,
#[prost(message, optional, tag = "2")]
pub forecast: ::core::option::Option<Forecast>,
#[prost(message, repeated, tag = "4")]
pub planned_product_reach_forecasts: ::prost::alloc::vec::Vec<PlannedProductReachForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Forecast {
#[prost(int64, optional, tag = "5")]
pub on_target_reach: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "6")]
pub total_reach: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "7")]
pub on_target_impressions: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "8")]
pub total_impressions: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "9")]
pub viewable_impressions: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlannedProductReachForecast {
#[prost(string, tag = "1")]
pub plannable_product_code: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub cost_micros: i64,
#[prost(message, optional, tag = "3")]
pub planned_product_forecast: ::core::option::Option<PlannedProductForecast>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlannedProductForecast {
#[prost(int64, tag = "1")]
pub on_target_reach: i64,
#[prost(int64, tag = "2")]
pub total_reach: i64,
#[prost(int64, tag = "3")]
pub on_target_impressions: i64,
#[prost(int64, tag = "4")]
pub total_impressions: i64,
#[prost(int64, optional, tag = "5")]
pub viewable_impressions: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OnTargetAudienceMetrics {
#[prost(int64, optional, tag = "3")]
pub youtube_audience_size: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "4")]
pub census_audience_size: ::core::option::Option<i64>,
}
#[doc = r" Generated client implementations."]
pub mod reach_plan_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Reach Plan Service gives users information about audience size that can"]
#[doc = " be reached through advertisement on YouTube. In particular,"]
#[doc = " GenerateReachForecast provides estimated number of people of specified"]
#[doc = " demographics that can be reached by an ad in a given market by a campaign of"]
#[doc = " certain duration with a defined budget."]
#[derive(Debug, Clone)]
pub struct ReachPlanServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReachPlanServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReachPlanServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ReachPlanServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the list of plannable locations (for example, countries & DMAs)."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_plannable_locations(
&mut self,
request: impl tonic::IntoRequest<super::ListPlannableLocationsRequest>,
) -> Result<tonic::Response<super::ListPlannableLocationsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ReachPlanService/ListPlannableLocations",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns the list of per-location plannable YouTube ad formats with allowed"]
#[doc = " targeting."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn list_plannable_products(
&mut self,
request: impl tonic::IntoRequest<super::ListPlannableProductsRequest>,
) -> Result<tonic::Response<super::ListPlannableProductsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ReachPlanService/ListPlannableProducts",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Generates a product mix ideas given a set of preferences. This method"]
#[doc = " helps the advertiser to obtain a good mix of ad formats and budget"]
#[doc = " allocations based on its preferences."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [ReachPlanError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_product_mix_ideas(
&mut self,
request: impl tonic::IntoRequest<super::GenerateProductMixIdeasRequest>,
) -> Result<tonic::Response<super::GenerateProductMixIdeasResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ReachPlanService/GenerateProductMixIdeas",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Generates a reach forecast for a given targeting / product mix."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RangeError]()"]
#[doc = " [ReachPlanError]()"]
#[doc = " [RequestError]()"]
pub async fn generate_reach_forecast(
&mut self,
request: impl tonic::IntoRequest<super::GenerateReachForecastRequest>,
) -> Result<tonic::Response<super::GenerateReachForecastResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.ReachPlanService/GenerateReachForecast",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRecommendationRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyRecommendationRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub operations: ::prost::alloc::vec::Vec<ApplyRecommendationOperation>,
#[prost(bool, tag = "3")]
pub partial_failure: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyRecommendationOperation {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(
oneof = "apply_recommendation_operation::ApplyParameters",
tags = "2, 3, 4, 5, 10, 6, 7, 8, 9, 11"
)]
pub apply_parameters: ::core::option::Option<apply_recommendation_operation::ApplyParameters>,
}
pub mod apply_recommendation_operation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CampaignBudgetParameters {
#[prost(int64, optional, tag = "2")]
pub new_budget_amount_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextAdParameters {
#[prost(message, optional, tag = "1")]
pub ad: ::core::option::Option<super::super::resources::Ad>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeywordParameters {
#[prost(string, optional, tag = "4")]
pub ad_group: ::core::option::Option<::prost::alloc::string::String>,
#[prost(
enumeration = "super::super::enums::keyword_match_type_enum::KeywordMatchType",
tag = "2"
)]
pub match_type: i32,
#[prost(int64, optional, tag = "5")]
pub cpc_bid_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetCpaOptInParameters {
#[prost(int64, optional, tag = "3")]
pub target_cpa_micros: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "4")]
pub new_campaign_budget_amount_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetRoasOptInParameters {
#[prost(double, optional, tag = "1")]
pub target_roas: ::core::option::Option<f64>,
#[prost(int64, optional, tag = "2")]
pub new_campaign_budget_amount_micros: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalloutExtensionParameters {
#[prost(message, repeated, tag = "1")]
pub callout_extensions: ::prost::alloc::vec::Vec<super::super::common::CalloutFeedItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallExtensionParameters {
#[prost(message, repeated, tag = "1")]
pub call_extensions: ::prost::alloc::vec::Vec<super::super::common::CallFeedItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SitelinkExtensionParameters {
#[prost(message, repeated, tag = "1")]
pub sitelink_extensions: ::prost::alloc::vec::Vec<super::super::common::SitelinkFeedItem>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveUnusedBudgetParameters {
#[prost(int64, optional, tag = "2")]
pub budget_micros_to_move: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponsiveSearchAdParameters {
#[prost(message, optional, tag = "1")]
pub ad: ::core::option::Option<super::super::resources::Ad>,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ApplyParameters {
#[prost(message, tag = "2")]
CampaignBudget(CampaignBudgetParameters),
#[prost(message, tag = "3")]
TextAd(TextAdParameters),
#[prost(message, tag = "4")]
Keyword(KeywordParameters),
#[prost(message, tag = "5")]
TargetCpaOptIn(TargetCpaOptInParameters),
#[prost(message, tag = "10")]
TargetRoasOptIn(TargetRoasOptInParameters),
#[prost(message, tag = "6")]
CalloutExtension(CalloutExtensionParameters),
#[prost(message, tag = "7")]
CallExtension(CallExtensionParameters),
#[prost(message, tag = "8")]
SitelinkExtension(SitelinkExtensionParameters),
#[prost(message, tag = "9")]
MoveUnusedBudget(MoveUnusedBudgetParameters),
#[prost(message, tag = "11")]
ResponsiveSearchAd(ResponsiveSearchAdParameters),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyRecommendationResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<ApplyRecommendationResult>,
#[prost(message, optional, tag = "2")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyRecommendationResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DismissRecommendationRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub operations:
::prost::alloc::vec::Vec<dismiss_recommendation_request::DismissRecommendationOperation>,
#[prost(bool, tag = "2")]
pub partial_failure: bool,
}
pub mod dismiss_recommendation_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DismissRecommendationOperation {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DismissRecommendationResponse {
#[prost(message, repeated, tag = "1")]
pub results:
::prost::alloc::vec::Vec<dismiss_recommendation_response::DismissRecommendationResult>,
#[prost(message, optional, tag = "2")]
pub partial_failure_error: ::core::option::Option<super::super::super::super::rpc::Status>,
}
pub mod dismiss_recommendation_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DismissRecommendationResult {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
}
#[doc = r" Generated client implementations."]
pub mod recommendation_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage recommendations."]
#[derive(Debug, Clone)]
pub struct RecommendationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> RecommendationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> RecommendationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
RecommendationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested recommendation in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_recommendation(
&mut self,
request: impl tonic::IntoRequest<super::GetRecommendationRequest>,
) -> Result<tonic::Response<super::super::resources::Recommendation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.RecommendationService/GetRecommendation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Applies given recommendations with corresponding apply parameters."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [DatabaseError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RecommendationError]()"]
#[doc = " [RequestError]()"]
#[doc = " [UrlFieldError]()"]
pub async fn apply_recommendation(
&mut self,
request: impl tonic::IntoRequest<super::ApplyRecommendationRequest>,
) -> Result<tonic::Response<super::ApplyRecommendationResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.RecommendationService/ApplyRecommendation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Dismisses given recommendations."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RecommendationError]()"]
#[doc = " [RequestError]()"]
pub async fn dismiss_recommendation(
&mut self,
request: impl tonic::IntoRequest<super::DismissRecommendationRequest>,
) -> Result<tonic::Response<super::DismissRecommendationResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.RecommendationService/DismissRecommendation",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSearchTermViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod search_term_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage search term views."]
#[derive(Debug, Clone)]
pub struct SearchTermViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> SearchTermViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SearchTermViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
SearchTermViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the attributes of the requested search term view."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_search_term_view(
&mut self,
request: impl tonic::IntoRequest<super::GetSearchTermViewRequest>,
) -> Result<tonic::Response<super::super::resources::SearchTermView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.SearchTermViewService/GetSearchTermView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetShoppingPerformanceViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod shopping_performance_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Shopping performance views."]
#[derive(Debug, Clone)]
pub struct ShoppingPerformanceViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ShoppingPerformanceViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ShoppingPerformanceViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ShoppingPerformanceViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested Shopping performance view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_shopping_performance_view(
&mut self,
request: impl tonic::IntoRequest<super::GetShoppingPerformanceViewRequest>,
) -> Result<tonic::Response<super::super::resources::ShoppingPerformanceView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ShoppingPerformanceViewService/GetShoppingPerformanceView") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetThirdPartyAppAnalyticsLinkRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegenerateShareableLinkIdRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegenerateShareableLinkIdResponse {}
#[doc = r" Generated client implementations."]
pub mod third_party_app_analytics_link_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service allows management of links between Google Ads and third party"]
#[doc = " app analytics."]
#[derive(Debug, Clone)]
pub struct ThirdPartyAppAnalyticsLinkServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ThirdPartyAppAnalyticsLinkServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ThirdPartyAppAnalyticsLinkServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ThirdPartyAppAnalyticsLinkServiceClient::new(InterceptedService::new(
inner,
interceptor,
))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the third party app analytics link in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_third_party_app_analytics_link(
&mut self,
request: impl tonic::IntoRequest<super::GetThirdPartyAppAnalyticsLinkRequest>,
) -> Result<
tonic::Response<super::super::resources::ThirdPartyAppAnalyticsLink>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ThirdPartyAppAnalyticsLinkService/GetThirdPartyAppAnalyticsLink") ;
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Regenerate ThirdPartyAppAnalyticsLink.shareable_link_id that should be"]
#[doc = " provided to the third party when setting up app analytics."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn regenerate_shareable_link_id(
&mut self,
request: impl tonic::IntoRequest<super::RegenerateShareableLinkIdRequest>,
) -> Result<tonic::Response<super::RegenerateShareableLinkIdResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http :: uri :: PathAndQuery :: from_static ("/google.ads.googleads.v7.services.ThirdPartyAppAnalyticsLinkService/RegenerateShareableLinkId") ;
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTopicConstantRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod topic_constant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch topic constants."]
#[derive(Debug, Clone)]
pub struct TopicConstantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TopicConstantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TopicConstantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
TopicConstantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested topic constant in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_topic_constant(
&mut self,
request: impl tonic::IntoRequest<super::GetTopicConstantRequest>,
) -> Result<tonic::Response<super::super::resources::TopicConstant>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.TopicConstantService/GetTopicConstant",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTopicViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod topic_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage topic views."]
#[derive(Debug, Clone)]
pub struct TopicViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TopicViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> TopicViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
TopicViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested topic view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_topic_view(
&mut self,
request: impl tonic::IntoRequest<super::GetTopicViewRequest>,
) -> Result<tonic::Response<super::super::resources::TopicView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.TopicViewService/GetTopicView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadUserDataRequest {
#[prost(string, tag = "1")]
pub customer_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub operations: ::prost::alloc::vec::Vec<UserDataOperation>,
#[prost(oneof = "upload_user_data_request::Metadata", tags = "2")]
pub metadata: ::core::option::Option<upload_user_data_request::Metadata>,
}
pub mod upload_user_data_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Metadata {
#[prost(message, tag = "2")]
CustomerMatchUserListMetadata(super::super::common::CustomerMatchUserListMetadata),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserDataOperation {
#[prost(oneof = "user_data_operation::Operation", tags = "1, 2")]
pub operation: ::core::option::Option<user_data_operation::Operation>,
}
pub mod user_data_operation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Create(super::super::common::UserData),
#[prost(message, tag = "2")]
Remove(super::super::common::UserData),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UploadUserDataResponse {
#[prost(string, optional, tag = "3")]
pub upload_date_time: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "4")]
pub received_operations_count: ::core::option::Option<i32>,
}
#[doc = r" Generated client implementations."]
pub mod user_data_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage user data uploads."]
#[doc = " Accessible only to customers on the allow-list."]
#[derive(Debug, Clone)]
pub struct UserDataServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> UserDataServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserDataServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
UserDataServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Uploads the given user data."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [CollectionSizeError]()"]
#[doc = " [FieldError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [MutateError]()"]
#[doc = " [OfflineUserDataJobError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
#[doc = " [UserDataError]()"]
pub async fn upload_user_data(
&mut self,
request: impl tonic::IntoRequest<super::UploadUserDataRequest>,
) -> Result<tonic::Response<super::UploadUserDataResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.UserDataService/UploadUserData",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserInterestRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod user_interest_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to fetch Google Ads User Interest."]
#[derive(Debug, Clone)]
pub struct UserInterestServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> UserInterestServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserInterestServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
UserInterestServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested user interest in full detail"]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_user_interest(
&mut self,
request: impl tonic::IntoRequest<super::GetUserInterestRequest>,
) -> Result<tonic::Response<super::super::resources::UserInterest>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.UserInterestService/GetUserInterest",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserLocationViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod user_location_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage user location views."]
#[derive(Debug, Clone)]
pub struct UserLocationViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> UserLocationViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UserLocationViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
UserLocationViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested user location view in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_user_location_view(
&mut self,
request: impl tonic::IntoRequest<super::GetUserLocationViewRequest>,
) -> Result<tonic::Response<super::super::resources::UserLocationView>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.UserLocationViewService/GetUserLocationView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod video_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage videos."]
#[derive(Debug, Clone)]
pub struct VideoServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> VideoServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> VideoServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
VideoServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested video in full detail."]
#[doc = ""]
#[doc = " List of thrown errors:"]
#[doc = " [AuthenticationError]()"]
#[doc = " [AuthorizationError]()"]
#[doc = " [HeaderError]()"]
#[doc = " [InternalError]()"]
#[doc = " [QuotaError]()"]
#[doc = " [RequestError]()"]
pub async fn get_video(
&mut self,
request: impl tonic::IntoRequest<super::GetVideoRequest>,
) -> Result<tonic::Response<super::super::resources::Video>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.VideoService/GetVideo",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWebpageViewRequest {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod webpage_view_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Service to manage webpage views."]
#[derive(Debug, Clone)]
pub struct WebpageViewServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> WebpageViewServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> WebpageViewServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
WebpageViewServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns the requested webpage view in full detail."]
pub async fn get_webpage_view(
&mut self,
request: impl tonic::IntoRequest<super::GetWebpageViewRequest>,
) -> Result<tonic::Response<super::super::resources::WebpageView>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.ads.googleads.v7.services.WebpageViewService/GetWebpageView",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}