Class

it.agilelab.bigdata.wasp.models

HttpModel

Related Doc: package models

Permalink

case class HttpModel(name: String, url: String, method: String, headersFieldName: Option[String], valueFieldsNames: List[String], compression: HttpCompression, mediaType: String, logBody: Boolean, structured: Boolean = true) extends DatastoreModel with Product with Serializable

The HttpModel used by HttpWriter to send data with HTTP protocol

name

The httpModel name

url

The url to send the request to

method

The HTTP methods: GET, POST, PUT, PATCH, DELETE

headersFieldName

The name of the DataFrame column to be used as http headers, it must be of type Map[String,String], if None, no header will be sent in the request, except for the content-type and content-encoding ones

valueFieldsNames

The list of DataFrame columns to be rendered as json in the http request body. If the passed list is empty, all the fields, except the headers field (if any) will be rendered as a json object. If there is only one field, the behaviour is controlled by the structured field

compression

The HttpCompression

mediaType

The format of the request content

logBody

It enable the request body logger

structured

Indicates how the request body will be rendered. The effect of this configuration has effect only if the DataFrame contains only one column to be sent and only if it is of ArrayType or MapType. If structured is true the array or map will always be enclosed in a json object, otherwise the map or the array will be at the top level of the json document. Input dataframe:

+---------+
|  values |
+---------+
|[3, 4, 5]|
+---------+

Request with structured = true

{"values" : [3, 4, 5]}

Request with structured = false

[3, 4, 5]
Linear Supertypes
Serializable, Serializable, Product, Equals, DatastoreModel, Model, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpModel
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. DatastoreModel
  7. Model
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpModel(name: String, url: String, method: String, headersFieldName: Option[String], valueFieldsNames: List[String], compression: HttpCompression, mediaType: String, logBody: Boolean, structured: Boolean = true)

    Permalink

    name

    The httpModel name

    url

    The url to send the request to

    method

    The HTTP methods: GET, POST, PUT, PATCH, DELETE

    headersFieldName

    The name of the DataFrame column to be used as http headers, it must be of type Map[String,String], if None, no header will be sent in the request, except for the content-type and content-encoding ones

    valueFieldsNames

    The list of DataFrame columns to be rendered as json in the http request body. If the passed list is empty, all the fields, except the headers field (if any) will be rendered as a json object. If there is only one field, the behaviour is controlled by the structured field

    compression

    The HttpCompression

    mediaType

    The format of the request content

    logBody

    It enable the request body logger

    structured

    Indicates how the request body will be rendered. The effect of this configuration has effect only if the DataFrame contains only one column to be sent and only if it is of ArrayType or MapType. If structured is true the array or map will always be enclosed in a json object, otherwise the map or the array will be at the top level of the json document. Input dataframe:

    +---------+
    |  values |
    +---------+
    |[3, 4, 5]|
    +---------+

    Request with structured = true

    {"values" : [3, 4, 5]}

    Request with structured = false

    [3, 4, 5]

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. val compression: HttpCompression

    Permalink

    The HttpCompression

  7. def datastoreProduct: DatastoreProduct

    Permalink
    Definition Classes
    HttpModelDatastoreModel
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. val headersFieldName: Option[String]

    Permalink

    The name of the DataFrame column to be used as http headers, it must be of type Map[String,String], if None, no header will be sent in the request, except for the content-type and content-encoding ones

  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val logBody: Boolean

    Permalink

    It enable the request body logger

  13. val mediaType: String

    Permalink

    The format of the request content

  14. val method: String

    Permalink

    The HTTP methods: GET, POST, PUT, PATCH, DELETE

  15. val name: String

    Permalink

    The httpModel name

    The httpModel name

    Definition Classes
    HttpModelModel
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. val structured: Boolean

    Permalink

    Indicates how the request body will be rendered.

    Indicates how the request body will be rendered. The effect of this configuration has effect only if the DataFrame contains only one column to be sent and only if it is of ArrayType or MapType. If structured is true the array or map will always be enclosed in a json object, otherwise the map or the array will be at the top level of the json document. Input dataframe:

    +---------+
    |  values |
    +---------+
    |[3, 4, 5]|
    +---------+

    Request with structured = true

    {"values" : [3, 4, 5]}

    Request with structured = false

    [3, 4, 5]
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. val url: String

    Permalink

    The url to send the request to

  22. val valueFieldsNames: List[String]

    Permalink

    The list of DataFrame columns to be rendered as json in the http request body.

    The list of DataFrame columns to be rendered as json in the http request body. If the passed list is empty, all the fields, except the headers field (if any) will be rendered as a json object. If there is only one field, the behaviour is controlled by the structured field

  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DatastoreModel

Inherited from Model

Inherited from AnyRef

Inherited from Any

Ungrouped