Class OpenRtb.NativeResponse.Asset

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

    public static final class OpenRtb.NativeResponse.Asset
    extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<OpenRtb.NativeResponse.Asset>
    implements OpenRtb.NativeResponse.AssetOrBuilder
     OpenRTB Native 1.0: Corresponds to the Asset Object in the request.
     The main container object for each asset requested or supported by Exchange
     on behalf of the rendering client. Any object that is required is to be
     flagged as such. Only one of the {title,img,video,data} objects should be
     present in each object. All others should be null/absent. The id is to be
     unique within the Asset array so that the response can be aligned.
     
    Protobuf type com.google.openrtb.NativeResponse.Asset
    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
      • hasId

        public boolean hasId()
         Unique asset ID, assigned by exchange, must match one of the asset IDs
         in request.
         REQUIRED in 1.0, or in 1.2 if embedded asset is being used.
         
        required int32 id = 1;
        Specified by:
        hasId in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public int getId()
         Unique asset ID, assigned by exchange, must match one of the asset IDs
         in request.
         REQUIRED in 1.0, or in 1.2 if embedded asset is being used.
         
        required int32 id = 1;
        Specified by:
        getId in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        The id.
      • hasRequired

        public boolean hasRequired()
         Set to true if asset is required. (bidder requires it to be displayed).
         
        optional bool required = 2 [default = false];
        Specified by:
        hasRequired in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the required field is set.
      • getRequired

        public boolean getRequired()
         Set to true if asset is required. (bidder requires it to be displayed).
         
        optional bool required = 2 [default = false];
        Specified by:
        getRequired in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        The required.
      • hasTitle

        public boolean hasTitle()
         Title object for title assets.
         
        .com.google.openrtb.NativeResponse.Asset.Title title = 3;
        Specified by:
        hasTitle in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the title field is set.
      • hasImg

        public boolean hasImg()
         Image object for image assets.
         
        .com.google.openrtb.NativeResponse.Asset.Image img = 4;
        Specified by:
        hasImg in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the img field is set.
      • hasVideo

        public boolean hasVideo()
         Video object for video assets.
         Note that in-stream video ads are not part of Native.
         Native ads may contain a video as the ad creative itself.
         
        .com.google.openrtb.NativeResponse.Asset.Video video = 5;
        Specified by:
        hasVideo in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the video field is set.
      • hasData

        public boolean hasData()
         Data object for ratings, prices etc.
         
        .com.google.openrtb.NativeResponse.Asset.Data data = 6;
        Specified by:
        hasData in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the data field is set.
      • hasLink

        public boolean hasLink()
         Link object for call to actions.
         This link object applies if the asset item is activated (clicked).
         If there is no link object on the asset, the parent link object on the
         bid response apply.
         
        optional .com.google.openrtb.NativeResponse.Link link = 7;
        Specified by:
        hasLink in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        Whether the link field is set.
      • getLink

        public OpenRtb.NativeResponse.Link getLink()
         Link object for call to actions.
         This link object applies if the asset item is activated (clicked).
         If there is no link object on the asset, the parent link object on the
         bid response apply.
         
        optional .com.google.openrtb.NativeResponse.Link link = 7;
        Specified by:
        getLink in interface OpenRtb.NativeResponse.AssetOrBuilder
        Returns:
        The link.
      • 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.Asset>
      • 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.Asset parseFrom​(ByteBuffer data)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

        public static OpenRtb.NativeResponse.Asset 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.Asset parseFrom​(byte[] data)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

        protected OpenRtb.NativeResponse.Asset.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.Asset> 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.Asset getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.NativeResponse.Asset>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder