ReportImpressionRequest


public final class ReportImpressionRequest


Represent input parameters to the reportImpression API.

Summary

Public constructors

ReportImpressionRequest(
    long adSelectionId,
    @NonNull AdSelectionConfig adSelectionConfig
)

Public methods

boolean
equals(Object other)

Checks whether two ReportImpressionRequest objects contain the same information.

final @NonNull AdSelectionConfig

optional config used in the selectAds() call identified by the provided ad selection ID.

final long

An ID unique only to a device user that identifies a successful ad selection.

int

Returns the hash of the ReportImpressionRequest object's data.

@NonNull String

Overrides the toString method.

Public constructors

ReportImpressionRequest

Added in 1.1.0-beta06
@ExperimentalFeatures.Ext8OptIn
public ReportImpressionRequest(long adSelectionId)

ReportImpressionRequest

Added in 1.0.0
public ReportImpressionRequest(
    long adSelectionId,
    @NonNull AdSelectionConfig adSelectionConfig
)
Parameters
long adSelectionId

An ID unique only to a device user that identifies a successful ad selection.

@NonNull AdSelectionConfig adSelectionConfig

optional config used in the selectAds() call identified by the provided ad selection ID. If the {@code adSelectionId} is for a on-device auction run using AdSelectionManager#selectAds, then the config must be included. If the {@code adSelectionId} is for a server auction run where device info collected by [AdSelectionManager#getAdSelectionData} then the impression reporting request should only include the ad selection id.

Public methods

equals

public boolean equals(Object other)

Checks whether two ReportImpressionRequest objects contain the same information.

getAdSelectionConfig

Added in 1.0.0
public final @NonNull AdSelectionConfig getAdSelectionConfig()

optional config used in the selectAds() call identified by the provided ad selection ID. If the {@code adSelectionId} is for a on-device auction run using AdSelectionManager#selectAds, then the config must be included. If the {@code adSelectionId} is for a server auction run where device info collected by [AdSelectionManager#getAdSelectionData} then the impression reporting request should only include the ad selection id.

getAdSelectionId

Added in 1.0.0
public final long getAdSelectionId()

An ID unique only to a device user that identifies a successful ad selection.

hashCode

public int hashCode()

Returns the hash of the ReportImpressionRequest object's data.

toString

public @NonNull String toString()

Overrides the toString method.