Class OpenRtb.NativeResponse

  • All Implemented Interfaces:
    OpenRtb.NativeResponseOrBuilder, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.NativeResponse>, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
    Enclosing class:
    OpenRtb

    public static final class OpenRtb.NativeResponse
    extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<OpenRtb.NativeResponse>
    implements OpenRtb.NativeResponseOrBuilder
     OpenRTB Native 1.0: The native response object is the top level JSON object
     which identifies an native response.
     
    Protobuf type com.google.openrtb.NativeResponse
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasVer

        public boolean hasVer()
         Version of the Native Markup version in use.
         RECOMMENDED by the OpenRTB Native specification.
         
        optional string ver = 1;
        Specified by:
        hasVer in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the ver field is set.
      • getVer

        public String getVer()
         Version of the Native Markup version in use.
         RECOMMENDED by the OpenRTB Native specification.
         
        optional string ver = 1;
        Specified by:
        getVer in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The ver.
      • getVerBytes

        public com.google.protobuf.ByteString getVerBytes()
         Version of the Native Markup version in use.
         RECOMMENDED by the OpenRTB Native specification.
         
        optional string ver = 1;
        Specified by:
        getVerBytes in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The bytes for ver.
      • getAssetsCount

        public int getAssetsCount()
         List of native ad's assets.
         RECOMMENDED in 1.0, 1.1, or in 1.2 as a fallback if assetsurl is provided.
         REQUIRED in 1.2, if not assetsurl is provided.
         
        repeated .com.google.openrtb.NativeResponse.Asset assets = 2;
        Specified by:
        getAssetsCount in interface OpenRtb.NativeResponseOrBuilder
      • getAssets

        public OpenRtb.NativeResponse.Asset getAssets​(int index)
         List of native ad's assets.
         RECOMMENDED in 1.0, 1.1, or in 1.2 as a fallback if assetsurl is provided.
         REQUIRED in 1.2, if not assetsurl is provided.
         
        repeated .com.google.openrtb.NativeResponse.Asset assets = 2;
        Specified by:
        getAssets in interface OpenRtb.NativeResponseOrBuilder
      • hasAssetsurl

        public boolean hasAssetsurl()
         URL of alternate source for the assets object. The expected response is a
         JSON object mirroring the asset object in the bid response, subject to
         certain requirements as specified in the individual objects.
         Where present, overrides the assets object in the response.
         
        optional string assetsurl = 6;
        Specified by:
        hasAssetsurl in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the assetsurl field is set.
      • getAssetsurl

        public String getAssetsurl()
         URL of alternate source for the assets object. The expected response is a
         JSON object mirroring the asset object in the bid response, subject to
         certain requirements as specified in the individual objects.
         Where present, overrides the assets object in the response.
         
        optional string assetsurl = 6;
        Specified by:
        getAssetsurl in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The assetsurl.
      • getAssetsurlBytes

        public com.google.protobuf.ByteString getAssetsurlBytes()
         URL of alternate source for the assets object. The expected response is a
         JSON object mirroring the asset object in the bid response, subject to
         certain requirements as specified in the individual objects.
         Where present, overrides the assets object in the response.
         
        optional string assetsurl = 6;
        Specified by:
        getAssetsurlBytes in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The bytes for assetsurl.
      • hasDcourl

        public boolean hasDcourl()
         URL where a dynamic creative specification may be found for populating this
         ad, per the Dynamic Content Ads Specification.
         Note this is a beta option as the interpretation of the Dynamic Content Ads
         Specification and how to assign those elementes into a native ad is outside
         the scope of this spec and must be agreed offline between parties or as may
         be specified in a future revision of the Dynamic Content Ads spec.
         Where present, overrides the assets object in the response.
         
        optional string dcourl = 7;
        Specified by:
        hasDcourl in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the dcourl field is set.
      • getDcourl

        public String getDcourl()
         URL where a dynamic creative specification may be found for populating this
         ad, per the Dynamic Content Ads Specification.
         Note this is a beta option as the interpretation of the Dynamic Content Ads
         Specification and how to assign those elementes into a native ad is outside
         the scope of this spec and must be agreed offline between parties or as may
         be specified in a future revision of the Dynamic Content Ads spec.
         Where present, overrides the assets object in the response.
         
        optional string dcourl = 7;
        Specified by:
        getDcourl in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The dcourl.
      • getDcourlBytes

        public com.google.protobuf.ByteString getDcourlBytes()
         URL where a dynamic creative specification may be found for populating this
         ad, per the Dynamic Content Ads Specification.
         Note this is a beta option as the interpretation of the Dynamic Content Ads
         Specification and how to assign those elementes into a native ad is outside
         the scope of this spec and must be agreed offline between parties or as may
         be specified in a future revision of the Dynamic Content Ads spec.
         Where present, overrides the assets object in the response.
         
        optional string dcourl = 7;
        Specified by:
        getDcourlBytes in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The bytes for dcourl.
      • hasLink

        public boolean hasLink()
         Destination Link. This is default link object for the ad.
         Individual assets can also have a link object which applies if the asset is
         activated (clicked). If the asset doesn't have a link object, the parent
         link object applies.
         See ResponseLink definition.
         REQUIRED by the OpenRTB Native specification.
         
        required .com.google.openrtb.NativeResponse.Link link = 3;
        Specified by:
        hasLink in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the link field is set.
      • getLink

        public OpenRtb.NativeResponse.Link getLink()
         Destination Link. This is default link object for the ad.
         Individual assets can also have a link object which applies if the asset is
         activated (clicked). If the asset doesn't have a link object, the parent
         link object applies.
         See ResponseLink definition.
         REQUIRED by the OpenRTB Native specification.
         
        required .com.google.openrtb.NativeResponse.Link link = 3;
        Specified by:
        getLink in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The link.
      • getLinkOrBuilder

        public OpenRtb.NativeResponse.LinkOrBuilder getLinkOrBuilder()
         Destination Link. This is default link object for the ad.
         Individual assets can also have a link object which applies if the asset is
         activated (clicked). If the asset doesn't have a link object, the parent
         link object applies.
         See ResponseLink definition.
         REQUIRED by the OpenRTB Native specification.
         
        required .com.google.openrtb.NativeResponse.Link link = 3;
        Specified by:
        getLinkOrBuilder in interface OpenRtb.NativeResponseOrBuilder
      • getImptrackersList

        @Deprecated
        public com.google.protobuf.ProtocolStringList getImptrackersList()
        Deprecated.
        com.google.openrtb.NativeResponse.imptrackers is deprecated. See openrtb.proto;l=1689
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Array of impression tracking URLs, expected to return a 1x1 image or
         204 response - typically only passed when using 3rd party trackers.
         
        repeated string imptrackers = 4 [deprecated = true];
        Specified by:
        getImptrackersList in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        A list containing the imptrackers.
      • getImptrackersCount

        @Deprecated
        public int getImptrackersCount()
        Deprecated.
        com.google.openrtb.NativeResponse.imptrackers is deprecated. See openrtb.proto;l=1689
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Array of impression tracking URLs, expected to return a 1x1 image or
         204 response - typically only passed when using 3rd party trackers.
         
        repeated string imptrackers = 4 [deprecated = true];
        Specified by:
        getImptrackersCount in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The count of imptrackers.
      • getImptrackers

        @Deprecated
        public String getImptrackers​(int index)
        Deprecated.
        com.google.openrtb.NativeResponse.imptrackers is deprecated. See openrtb.proto;l=1689
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Array of impression tracking URLs, expected to return a 1x1 image or
         204 response - typically only passed when using 3rd party trackers.
         
        repeated string imptrackers = 4 [deprecated = true];
        Specified by:
        getImptrackers in interface OpenRtb.NativeResponseOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The imptrackers at the given index.
      • getImptrackersBytes

        @Deprecated
        public com.google.protobuf.ByteString getImptrackersBytes​(int index)
        Deprecated.
        com.google.openrtb.NativeResponse.imptrackers is deprecated. See openrtb.proto;l=1689
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Array of impression tracking URLs, expected to return a 1x1 image or
         204 response - typically only passed when using 3rd party trackers.
         
        repeated string imptrackers = 4 [deprecated = true];
        Specified by:
        getImptrackersBytes in interface OpenRtb.NativeResponseOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the imptrackers at the given index.
      • hasJstracker

        @Deprecated
        public boolean hasJstracker()
        Deprecated.
        com.google.openrtb.NativeResponse.jstracker is deprecated. See openrtb.proto;l=1694
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Optional javascript impression tracker. Contains <script> tags to be
         executed at impression time where it can be supported.
         
        optional string jstracker = 5 [deprecated = true];
        Specified by:
        hasJstracker in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the jstracker field is set.
      • getJstracker

        @Deprecated
        public String getJstracker()
        Deprecated.
        com.google.openrtb.NativeResponse.jstracker is deprecated. See openrtb.proto;l=1694
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Optional javascript impression tracker. Contains <script> tags to be
         executed at impression time where it can be supported.
         
        optional string jstracker = 5 [deprecated = true];
        Specified by:
        getJstracker in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The jstracker.
      • getJstrackerBytes

        @Deprecated
        public com.google.protobuf.ByteString getJstrackerBytes()
        Deprecated.
        com.google.openrtb.NativeResponse.jstracker is deprecated. See openrtb.proto;l=1694
         DEPRECATED in OpenRTB Native 1.2+. Prefer object <code>EventTracker</code>.
         Optional javascript impression tracker. Contains <script> tags to be
         executed at impression time where it can be supported.
         
        optional string jstracker = 5 [deprecated = true];
        Specified by:
        getJstrackerBytes in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The bytes for jstracker.
      • getEventtrackersCount

        public int getEventtrackersCount()
         Array of response event trackers to run with the ad, in response to the
         declared supported methods in the NativeRequest. Replaces imptrackers and
         jstrackers.
         
        repeated .com.google.openrtb.NativeResponse.EventTracker eventtrackers = 8;
        Specified by:
        getEventtrackersCount in interface OpenRtb.NativeResponseOrBuilder
      • hasPrivacy

        public boolean hasPrivacy()
         If support was indicated in the request, URL of a page informing the user
         about the buyer's targeting activity.
         
        optional string privacy = 9;
        Specified by:
        hasPrivacy in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        Whether the privacy field is set.
      • getPrivacy

        public String getPrivacy()
         If support was indicated in the request, URL of a page informing the user
         about the buyer's targeting activity.
         
        optional string privacy = 9;
        Specified by:
        getPrivacy in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The privacy.
      • getPrivacyBytes

        public com.google.protobuf.ByteString getPrivacyBytes()
         If support was indicated in the request, URL of a page informing the user
         about the buyer's targeting activity.
         
        optional string privacy = 9;
        Specified by:
        getPrivacyBytes in interface OpenRtb.NativeResponseOrBuilder
        Returns:
        The bytes for privacy.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.ExtendableMessage<OpenRtb.NativeResponse>
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(com.google.protobuf.ByteString data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(com.google.protobuf.ByteString data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(byte[] data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenRtb.NativeResponse parseFrom​(byte[] data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public OpenRtb.NativeResponse.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public OpenRtb.NativeResponse.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected OpenRtb.NativeResponse.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<OpenRtb.NativeResponse> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public OpenRtb.NativeResponse getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.NativeResponse>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder