import typing

import android.adservices.common
import android.content
import android.net
import android.os
import android.view
import java
import java.chaquopy
import java.lang
import java.util
import java.util.concurrent

class AdSelectionConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AdSelectionConfig]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdSelectionSignals(self) -> android.adservices.common.AdSelectionSignals: ...
    def getCustomAudienceBuyers(self) -> java.util.List[android.adservices.common.AdTechIdentifier]: ...
    def getDecisionLogicUri(self) -> android.net.Uri: ...
    def getPerBuyerSignals(self) -> java.util.Map[android.adservices.common.AdTechIdentifier, android.adservices.common.AdSelectionSignals]: ...
    def getPerBuyerSignedContextualAds(self) -> java.util.Map[android.adservices.common.AdTechIdentifier, SignedContextualAds]: ...
    def getSeller(self) -> android.adservices.common.AdTechIdentifier: ...
    def getSellerSignals(self) -> android.adservices.common.AdSelectionSignals: ...
    def getTrustedScoringSignalsUri(self) -> android.net.Uri: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> AdSelectionConfig: ...
        def setAdSelectionSignals(self, adSelectionSignals: android.adservices.common.AdSelectionSignals, /) -> AdSelectionConfig.Builder: ...
        def setCustomAudienceBuyers(self, customAudienceBuyers: java.util.List[android.adservices.common.AdTechIdentifier], /) -> AdSelectionConfig.Builder: ...
        def setDecisionLogicUri(self, decisionLogicUri: android.net.Uri, /) -> AdSelectionConfig.Builder: ...
        def setPerBuyerSignals(self, perBuyerSignals: java.util.Map[android.adservices.common.AdTechIdentifier, android.adservices.common.AdSelectionSignals], /) -> AdSelectionConfig.Builder: ...
        def setPerBuyerSignedContextualAds(self, buyerSignedContextualAds: java.util.Map[android.adservices.common.AdTechIdentifier, SignedContextualAds], /) -> AdSelectionConfig.Builder: ...
        def setSeller(self, seller: android.adservices.common.AdTechIdentifier, /) -> AdSelectionConfig.Builder: ...
        def setSellerSignals(self, sellerSignals: android.adservices.common.AdSelectionSignals, /) -> AdSelectionConfig.Builder: ...
        def setTrustedScoringSignalsUri(self, trustedScoringSignalsUri: android.net.Uri, /) -> AdSelectionConfig.Builder: ...

class AdSelectionFromOutcomesConfig(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AdSelectionFromOutcomesConfig]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdSelectionIds(self) -> java.util.List[java.lang.Long]: ...
    def getSelectionLogicUri(self) -> android.net.Uri: ...
    def getSelectionSignals(self) -> android.adservices.common.AdSelectionSignals: ...
    def getSeller(self) -> android.adservices.common.AdTechIdentifier: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> AdSelectionFromOutcomesConfig: ...
        def setAdSelectionIds(self, adSelectionIds: java.util.List[java.lang.Long], /) -> AdSelectionFromOutcomesConfig.Builder: ...
        def setSelectionLogicUri(self, selectionLogicUri: android.net.Uri, /) -> AdSelectionFromOutcomesConfig.Builder: ...
        def setSelectionSignals(self, selectionSignals: android.adservices.common.AdSelectionSignals, /) -> AdSelectionFromOutcomesConfig.Builder: ...
        def setSeller(self, seller: android.adservices.common.AdTechIdentifier, /) -> AdSelectionFromOutcomesConfig.Builder: ...

class AdSelectionManager(java.lang.Object):
    @staticmethod
    def get(context: android.content.Context, /) -> AdSelectionManager: ...
    def getAdSelectionData(self, request: GetAdSelectionDataRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[GetAdSelectionDataOutcome, java.lang.Exception], /) -> None: ...
    def getTestAdSelectionManager(self) -> TestAdSelectionManager: ...
    def persistAdSelectionResult(self, request: PersistAdSelectionResultRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[AdSelectionOutcome, java.lang.Exception], /) -> None: ...
    def reportEvent(self, request: ReportEventRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def reportImpression(self, request: ReportImpressionRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    @typing.overload
    def selectAds(self, adSelectionConfig: AdSelectionConfig, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[AdSelectionOutcome, java.lang.Exception], /) -> None: ...
    @typing.overload
    def selectAds(self, adSelectionFromOutcomesConfig: AdSelectionFromOutcomesConfig, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[AdSelectionOutcome, java.lang.Exception], /) -> None: ...
    def setAppInstallAdvertisers(self, request: SetAppInstallAdvertisersRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def updateAdCounterHistogram(self, updateAdCounterHistogramRequest: UpdateAdCounterHistogramRequest, executor: java.util.concurrent.Executor, outcomeReceiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...

class AdSelectionOutcome(java.lang.Object):
    NO_OUTCOME: typing.ClassVar[AdSelectionOutcome] = ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdSelectionId(self) -> int: ...
    def getComponentAdUris(self) -> java.util.List[android.net.Uri]: ...
    def getRenderUri(self) -> android.net.Uri: ...
    def getWinningSeller(self) -> android.adservices.common.AdTechIdentifier: ...
    def hasOutcome(self) -> bool: ...
    def hashCode(self) -> int: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> AdSelectionOutcome: ...
        def setAdSelectionId(self, adSelectionId: int | java.jlong | java.lang.Long, /) -> AdSelectionOutcome.Builder: ...
        def setComponentAdUris(self, componentAdUris: java.util.List[android.net.Uri], /) -> AdSelectionOutcome.Builder: ...
        def setRenderUri(self, renderUri: android.net.Uri, /) -> AdSelectionOutcome.Builder: ...

class AdWithBid(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[AdWithBid]] = ...
    def __init__(self, adData: android.adservices.common.AdData, bid: float | java.jdouble | java.lang.Double, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdData(self) -> android.adservices.common.AdData: ...
    def getBid(self) -> float: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class AddAdSelectionFromOutcomesOverrideRequest(java.lang.Object):
    def __init__(self, adSelectionFromOutcomesConfig: AdSelectionFromOutcomesConfig, outcomeSelectionLogicJs: str | java.lang.String, outcomeSelectionTrustedSignals: android.adservices.common.AdSelectionSignals, /) -> None: ...
    def getAdSelectionFromOutcomesConfig(self) -> AdSelectionFromOutcomesConfig: ...
    def getOutcomeSelectionLogicJs(self) -> str: ...
    def getOutcomeSelectionTrustedSignals(self) -> android.adservices.common.AdSelectionSignals: ...

class AddAdSelectionOverrideRequest(java.lang.Object):
    @typing.overload
    def __init__(self, adSelectionConfig: AdSelectionConfig, decisionLogicJs: str | java.lang.String, trustedScoringSignals: android.adservices.common.AdSelectionSignals, /) -> None: ...
    @typing.overload
    def __init__(self, adSelectionConfig: AdSelectionConfig, decisionLogicJs: str | java.lang.String, trustedScoringSignals: android.adservices.common.AdSelectionSignals, perBuyerDecisionLogic: PerBuyerDecisionLogic, /) -> None: ...
    def getAdSelectionConfig(self) -> AdSelectionConfig: ...
    def getDecisionLogicJs(self) -> str: ...
    def getPerBuyerDecisionLogic(self) -> PerBuyerDecisionLogic: ...
    def getTrustedScoringSignals(self) -> android.adservices.common.AdSelectionSignals: ...

class DecisionLogic(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DecisionLogic]] = ...
    def __init__(self, buyerDecisionLogic: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getLogic(self) -> str: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class GetAdSelectionDataOutcome(java.lang.Object):
    def getAdSelectionData(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getAdSelectionDataId(self) -> int: ...
    def getAdSelectionId(self) -> int: ...

class GetAdSelectionDataRequest(java.lang.Object):
    def getCoordinatorOriginUri(self) -> android.net.Uri | None: ...
    def getSeller(self) -> android.adservices.common.AdTechIdentifier | None: ...
    def getSellerConfiguration(self) -> SellerConfiguration: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> GetAdSelectionDataRequest: ...
        def setCoordinatorOriginUri(self, coordinatorOriginUri: android.net.Uri, /) -> GetAdSelectionDataRequest.Builder: ...
        def setSeller(self, seller: android.adservices.common.AdTechIdentifier, /) -> GetAdSelectionDataRequest.Builder: ...
        def setSellerConfiguration(self, sellerConfiguration: SellerConfiguration, /) -> GetAdSelectionDataRequest.Builder: ...

class PerBuyerConfiguration(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PerBuyerConfiguration]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getBuyer(self) -> android.adservices.common.AdTechIdentifier: ...
    def getTargetInputSizeBytes(self) -> int: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> PerBuyerConfiguration: ...
        def setBuyer(self, buyer: android.adservices.common.AdTechIdentifier, /) -> PerBuyerConfiguration.Builder: ...
        def setTargetInputSizeBytes(self, targetInputSizeB: int | java.jint | java.lang.Integer, /) -> PerBuyerConfiguration.Builder: ...

class PerBuyerDecisionLogic(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[PerBuyerDecisionLogic]] = ...
    EMPTY: typing.ClassVar[PerBuyerDecisionLogic] = ...
    def __init__(self, perBuyerLogicMap: java.util.Map[android.adservices.common.AdTechIdentifier, DecisionLogic], /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getPerBuyerLogicMap(self) -> java.util.Map[android.adservices.common.AdTechIdentifier, DecisionLogic]: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class PersistAdSelectionResultRequest(java.lang.Object):
    def getAdSelectionDataId(self) -> int: ...
    def getAdSelectionId(self) -> int: ...
    def getAdSelectionResult(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getSeller(self) -> android.adservices.common.AdTechIdentifier | None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> PersistAdSelectionResultRequest: ...
        def setAdSelectionDataId(self, adSelectionDataId: int | java.jlong | java.lang.Long, /) -> PersistAdSelectionResultRequest.Builder: ...
        def setAdSelectionId(self, adSelectionId: int | java.jlong | java.lang.Long, /) -> PersistAdSelectionResultRequest.Builder: ...
        def setAdSelectionResult(self, adSelectionResult: java.chaquopy.JavaArrayJByte, /) -> PersistAdSelectionResultRequest.Builder: ...
        def setSeller(self, seller: android.adservices.common.AdTechIdentifier, /) -> PersistAdSelectionResultRequest.Builder: ...

class RemoveAdSelectionFromOutcomesOverrideRequest(java.lang.Object):
    def __init__(self, config: AdSelectionFromOutcomesConfig, /) -> None: ...
    def getAdSelectionFromOutcomesConfig(self) -> AdSelectionFromOutcomesConfig: ...

class RemoveAdSelectionOverrideRequest(java.lang.Object):
    def __init__(self, adSelectionConfig: AdSelectionConfig, /) -> None: ...
    def getAdSelectionConfig(self) -> AdSelectionConfig: ...

class ReportEventRequest(java.lang.Object):
    FLAG_REPORTING_DESTINATION_BUYER: typing.ClassVar[int] = ...
    FLAG_REPORTING_DESTINATION_COMPONENT_SELLER: typing.ClassVar[int] = ...
    FLAG_REPORTING_DESTINATION_SELLER: typing.ClassVar[int] = ...
    def getAdSelectionId(self) -> int: ...
    def getData(self) -> str: ...
    def getInputEvent(self) -> android.view.InputEvent | None: ...
    def getKey(self) -> str: ...
    def getReportingDestinations(self) -> int: ...

    class Builder(java.lang.Object):
        def __init__(self, adSelectionId: int | java.jlong | java.lang.Long, eventKey: str | java.lang.String, eventData: str | java.lang.String, reportingDestinations: int | java.jint | java.lang.Integer, /) -> None: ...
        def build(self) -> ReportEventRequest: ...
        def setAdSelectionId(self, adSelectionId: int | java.jlong | java.lang.Long, /) -> ReportEventRequest.Builder: ...
        def setData(self, eventData: str | java.lang.String, /) -> ReportEventRequest.Builder: ...
        def setInputEvent(self, inputEvent: android.view.InputEvent, /) -> ReportEventRequest.Builder: ...
        def setKey(self, eventKey: str | java.lang.String, /) -> ReportEventRequest.Builder: ...
        def setReportingDestinations(self, reportingDestinations: int | java.jint | java.lang.Integer, /) -> ReportEventRequest.Builder: ...

class ReportImpressionRequest(java.lang.Object):
    @typing.overload
    def __init__(self, adSelectionId: int | java.jlong | java.lang.Long, /) -> None: ...
    @typing.overload
    def __init__(self, adSelectionId: int | java.jlong | java.lang.Long, adSelectionConfig: AdSelectionConfig, /) -> None: ...
    def getAdSelectionConfig(self) -> AdSelectionConfig: ...
    def getAdSelectionId(self) -> int: ...

class SellerConfiguration(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SellerConfiguration]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getMaximumPayloadSizeBytes(self) -> int: ...
    def getPerBuyerConfigurations(self) -> java.util.Set[PerBuyerConfiguration]: ...
    def hashCode(self) -> int: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> SellerConfiguration: ...
        def setMaximumPayloadSizeBytes(self, maximumPayloadSizeBytes: int | java.jint | java.lang.Integer, /) -> SellerConfiguration.Builder: ...
        def setPerBuyerConfigurations(self, perBuyerConfigurations: java.util.Set[PerBuyerConfiguration], /) -> SellerConfiguration.Builder: ...

class SetAppInstallAdvertisersRequest(java.lang.Object):
    def getAdvertisers(self) -> java.util.Set[android.adservices.common.AdTechIdentifier]: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> SetAppInstallAdvertisersRequest: ...
        def setAdvertisers(self, advertisers: java.util.Set[android.adservices.common.AdTechIdentifier], /) -> SetAppInstallAdvertisersRequest.Builder: ...

class SignedContextualAds(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[SignedContextualAds]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdsWithBid(self) -> java.util.List[AdWithBid]: ...
    def getBuyer(self) -> android.adservices.common.AdTechIdentifier: ...
    def getDecisionLogicUri(self) -> android.net.Uri: ...
    def getSignature(self) -> java.chaquopy.JavaArrayJByte: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, signedContextualAds: SignedContextualAds, /) -> None: ...
        def build(self) -> SignedContextualAds: ...
        def setAdsWithBid(self, adsWithBid: java.util.List[AdWithBid], /) -> SignedContextualAds.Builder: ...
        def setBuyer(self, buyer: android.adservices.common.AdTechIdentifier, /) -> SignedContextualAds.Builder: ...
        def setDecisionLogicUri(self, decisionLogicUri: android.net.Uri, /) -> SignedContextualAds.Builder: ...
        def setSignature(self, signature: java.chaquopy.JavaArrayJByte, /) -> SignedContextualAds.Builder: ...

class TestAdSelectionManager(java.lang.Object):
    def overrideAdSelectionConfigRemoteInfo(self, request: AddAdSelectionOverrideRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def overrideAdSelectionFromOutcomesConfigRemoteInfo(self, request: AddAdSelectionFromOutcomesOverrideRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def removeAdSelectionConfigRemoteInfoOverride(self, request: RemoveAdSelectionOverrideRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def removeAdSelectionFromOutcomesConfigRemoteInfoOverride(self, request: RemoveAdSelectionFromOutcomesOverrideRequest, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def resetAllAdSelectionConfigRemoteOverrides(self, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...
    def resetAllAdSelectionFromOutcomesConfigRemoteOverrides(self, executor: java.util.concurrent.Executor, receiver: android.os.OutcomeReceiver[java.lang.Object, java.lang.Exception], /) -> None: ...

class UpdateAdCounterHistogramRequest(java.lang.Object):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAdEventType(self) -> int: ...
    def getAdSelectionId(self) -> int: ...
    def getCallerAdTech(self) -> android.adservices.common.AdTechIdentifier: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        def __init__(self, adSelectionId: int | java.jlong | java.lang.Long, adEventType: int | java.jint | java.lang.Integer, callerAdTech: android.adservices.common.AdTechIdentifier, /) -> None: ...
        def build(self) -> UpdateAdCounterHistogramRequest: ...
        def setAdEventType(self, adEventType: int | java.jint | java.lang.Integer, /) -> UpdateAdCounterHistogramRequest.Builder: ...
        def setAdSelectionId(self, adSelectionId: int | java.jlong | java.lang.Long, /) -> UpdateAdCounterHistogramRequest.Builder: ...
        def setCallerAdTech(self, callerAdTech: android.adservices.common.AdTechIdentifier, /) -> UpdateAdCounterHistogramRequest.Builder: ...
