Class GoogleAdsV19.Read
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
GoogleAdsV19
PTransform
that reads the results of a Google Ads query as GoogleAdsRow
objects.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPCollection
<com.google.ads.googleads.v19.services.GoogleAdsRow> expand
(PCollection<String> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.void
populateDisplayData
(DisplayData.Builder builder) Register display data for the given transform or component.withDeveloperToken
(@Nullable String developerToken) Creates and returns a newGoogleAdsV19.Read
transform with the specified developer token.withGoogleAdsClientFactory
(GoogleAdsClientFactory googleAdsClientFactory) Creates and returns a newGoogleAdsV19.Read
transform with the specified client factory.withLoginCustomerId
(@Nullable Long loginCustomerId) Creates and returns a newGoogleAdsV19.Read
transform with the specified login customer ID.Creates and returns a newGoogleAdsV19.Read
transform with the specified query.withRateLimitPolicy
(GoogleAdsIO.RateLimitPolicyFactory<com.google.ads.googleads.v19.errors.GoogleAdsError> rateLimitPolicyFactory) Creates and returns a newGoogleAdsV19.Read
transform with the specified rate limit policy factory.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
Read
public Read()
-
-
Method Details
-
withDeveloperToken
Creates and returns a newGoogleAdsV19.Read
transform with the specified developer token. A developer token is required to access the Google Ads API.- Parameters:
developerToken
- The developer token to set.- Returns:
- A new
GoogleAdsV19.Read
transform with the specified developer token. - See Also:
-
withLoginCustomerId
Creates and returns a newGoogleAdsV19.Read
transform with the specified login customer ID. A login customer ID is only required for manager accounts.- Parameters:
loginCustomerId
- The login customer ID to set.- Returns:
- A new
GoogleAdsV19.Read
transform with the specified login customer ID. - See Also:
-
withQuery
Creates and returns a newGoogleAdsV19.Read
transform with the specified query. The query will be executed for each customer ID.- Parameters:
query
-- Returns:
- A new
GoogleAdsV19.Read
transform with the specified query. - See Also:
-
withGoogleAdsClientFactory
Creates and returns a newGoogleAdsV19.Read
transform with the specified client factory. AGoogleAdsClientFactory
builds theGoogleAdsClient
used to construct service clients. TheDefaultGoogleAdsClientFactory
should be sufficient for most purposes unless the construction ofGoogleAdsClient
requires customization.- Parameters:
googleAdsClientFactory
-- Returns:
- A new
GoogleAdsV19.Read
transform with the specified client factory. - See Also:
-
withRateLimitPolicy
public GoogleAdsV19.Read withRateLimitPolicy(GoogleAdsIO.RateLimitPolicyFactory<com.google.ads.googleads.v19.errors.GoogleAdsError> rateLimitPolicyFactory) Creates and returns a newGoogleAdsV19.Read
transform with the specified rate limit policy factory. AGoogleAdsIO.RateLimitPolicyFactory
builds theGoogleAdsIO.RateLimitPolicy
used to limit the number of requests made byGoogleAdsV19.ReadAll.ReadAllFn
. The Google Ads API enforces global limits from the developer token down to the customer ID and it is recommended to host a shared rate limiting service to coordinate traffic to the Google Ads API across all applications using the same developer token. Users of these transforms are strongly advised to implement their ownGoogleAdsIO.RateLimitPolicy
andGoogleAdsIO.RateLimitPolicyFactory
to interact with a shared rate limiting service for any production workloads.- Parameters:
rateLimitPolicyFactory
-- Returns:
- A new
GoogleAdsV19.Read
transform with the specified rate limit policy factory. - See Also:
-
expand
public PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow> expand(PCollection<String> input) Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<String>,
PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>>
-
populateDisplayData
Description copied from class:PTransform
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classPTransform<PCollection<String>,
PCollection<com.google.ads.googleads.v19.services.GoogleAdsRow>> - Parameters:
builder
- The builder to populate with display data.- See Also:
-