Class OpenRtb.NativeRequest.Asset

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

    public static final class OpenRtb.NativeRequest.Asset
    extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<OpenRtb.NativeRequest.Asset>
    implements OpenRtb.NativeRequest.AssetOrBuilder
     OpenRTB Native 1.0: 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.NativeRequest.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. Typically a counter for the array.
         REQUIRED by the OpenRTB Native specification.
         
        required int32 id = 1;
        Specified by:
        hasId in interface OpenRtb.NativeRequest.AssetOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public int getId()
         Unique asset ID, assigned by exchange. Typically a counter for the array.
         REQUIRED by the OpenRTB Native specification.
         
        required int32 id = 1;
        Specified by:
        getId in interface OpenRtb.NativeRequest.AssetOrBuilder
        Returns:
        The id.
      • hasRequired

        public boolean hasRequired()
         Set to true if asset is required
         (exchange will not accept a bid without it).
         
        optional bool required = 2 [default = false];
        Specified by:
        hasRequired in interface OpenRtb.NativeRequest.AssetOrBuilder
        Returns:
        Whether the required field is set.
      • getRequired

        public boolean getRequired()
         Set to true if asset is required
         (exchange will not accept a bid without it).
         
        optional bool required = 2 [default = false];
        Specified by:
        getRequired in interface OpenRtb.NativeRequest.AssetOrBuilder
        Returns:
        The required.
      • hasTitle

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

        public boolean hasImg()
         Image object for image assets.
         
        .com.google.openrtb.NativeRequest.Asset.Image img = 4;
        Specified by:
        hasImg in interface OpenRtb.NativeRequest.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.BidRequest.Imp.Video video = 5;
        Specified by:
        hasVideo in interface OpenRtb.NativeRequest.AssetOrBuilder
        Returns:
        Whether the video field is set.
      • hasData

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.ExtendableMessage<OpenRtb.NativeRequest.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.NativeRequest.Asset parseFrom​(ByteBuffer data)
                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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