Struct gapi_grpc::google::ads::googleads::v5::services::google_ads_service_client::GoogleAdsServiceClient [−][src]
Service to fetch data and metrics across resources.
Implementations
impl GoogleAdsServiceClient<Channel>
[src]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
impl<T> GoogleAdsServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
[src]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
[src]
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
[src]
pub async fn search(
&mut self,
request: impl IntoRequest<SearchGoogleAdsRequest>
) -> Result<Response<SearchGoogleAdsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<SearchGoogleAdsRequest>
) -> Result<Response<SearchGoogleAdsResponse>, Status>
Returns all rows that match the search query.
pub async fn search_stream(
&mut self,
request: impl IntoRequest<SearchGoogleAdsStreamRequest>
) -> Result<Response<Streaming<SearchGoogleAdsStreamResponse>>, Status>
[src]
&mut self,
request: impl IntoRequest<SearchGoogleAdsStreamRequest>
) -> Result<Response<Streaming<SearchGoogleAdsStreamResponse>>, Status>
Returns all rows that match the search stream query.
pub async fn mutate(
&mut self,
request: impl IntoRequest<MutateGoogleAdsRequest>
) -> Result<Response<MutateGoogleAdsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<MutateGoogleAdsRequest>
) -> Result<Response<MutateGoogleAdsResponse>, Status>
Creates, updates, or removes resources. This method supports atomic transactions with multiple types of resources. For example, you can atomically create a campaign and a campaign budget, or perform up to thousands of mutates atomically.
This method is essentially a wrapper around a series of mutate methods. The only features it offers over calling those methods directly are:
- Atomic transactions
- Temp resource names (described below)
- Somewhat reduced latency over making a series of mutate calls
Note: Only resources that support atomic transactions are included, so this method can’t replace all calls to individual services.
Atomic Transaction Benefits
Atomicity makes error handling much easier. If you’re making a series of changes and one fails, it can leave your account in an inconsistent state. With atomicity, you either reach the desired state directly, or the request fails and you can retry.
Temp Resource Names
Temp resource names are a special type of resource name used to create a
resource and reference that resource in the same request. For example, if a
campaign budget is created with resource_name
equal to
customers/123/campaignBudgets/-1
, that resource name can be reused in
the Campaign.budget
field in the same request. That way, the two
resources are created and linked atomically.
To create a temp resource name, put a negative number in the part of the name that the server would normally allocate.
Note:
- Resources must be created with a temp name before the name can be reused. For example, the previous CampaignBudget+Campaign example would fail if the mutate order was reversed.
- Temp names are not remembered across requests.
- There’s no limit to the number of temp names in a request.
- Each temp name must use a unique negative number, even if the resource types differ.
Latency
It’s important to group mutates by resource type or the request may time out and fail. Latency is roughly equal to a series of calls to individual mutate methods, where each change in resource type is a new call. For example, mutating 10 campaigns then 10 ad groups is like 2 calls, while mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls.
Trait Implementations
impl<T: Clone> Clone for GoogleAdsServiceClient<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for GoogleAdsServiceClient<T>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for GoogleAdsServiceClient<T>
impl<T> Send for GoogleAdsServiceClient<T> where
T: Send,
T: Send,
impl<T> Sync for GoogleAdsServiceClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for GoogleAdsServiceClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for GoogleAdsServiceClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,