All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sksamuel.elastic4s.requests.mappings.dynamictemplate.DynamicTemplateRequest.scala Maven / Gradle / Ivy

There is a newer version: 8.15.4
Show newest version
package com.sksamuel.elastic4s.requests.mappings.dynamictemplate

import com.sksamuel.elastic4s.ext.OptionImplicits._
import com.sksamuel.elastic4s.fields.ElasticField

case class DynamicTemplateRequest(
                                   name: String,
                                   mapping: ElasticField,
                                   `match`: Option[String] = None,
                                   unmatch: Option[String] = None,
                                   pathMatch: Option[String] = None,
                                   pathUnmatch: Option[String] = None,
                                   MatchPattern: Option[String] = None,
                                   matchMappingType: Option[String] = None
                                 ) {

  def `match`(m: String): DynamicTemplateRequest = matching(m)
  def matching(m: String): DynamicTemplateRequest = copy(`match` = m.some)
  def matchPattern(m: String): DynamicTemplateRequest = copy(MatchPattern = m.some)

  def unmatch(m: String): DynamicTemplateRequest = copy(unmatch = m.some)
  def pathMatch(path: String): DynamicTemplateRequest = copy(pathMatch = path.some)
  def pathUnmatch(path: String): DynamicTemplateRequest = copy(pathUnmatch = path.some)

  def matchMappingType(`type`: String): DynamicTemplateRequest = copy(matchMappingType = `type`.some)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy