<commit_before>/*
 * Licensed to Typesafe under one or more contributor license agreements.
 * See the CONTRIBUTING file distributed with this work for
 * additional information regarding copyright ownership.
 * This file is licensed to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.squbs.httpclient

import org.squbs.httpclient.env.{Default, Environment}
<<<<<<< HEAD
<<<<<<< HEAD
import org.squbs.httpclient.json.Json4sJacksonNoTypeHintsProtocol
import org.squbs.proxy.SimplePipelineConfig
=======
>>>>>>> refractoring the code SQUBS-504
=======
import org.squbs.httpclient.json.Json4sJacksonNoTypeHintsProtocol
import org.squbs.httpclient.pipeline.Pipeline
>>>>>>> 1. separate Settings & Pipeline from Configuration
import spray.httpx.marshalling.Marshaller

object HttpClientManagerMessage {

  /**
   * Success => HttpClientActor
   * @param name
   * @param env
   */
  case class Get(name: String, env: Environment = Default)

  /**
   * Success => DeleteSuccess
   * Failure => HttpClientNotExistException
   * @param name
   * @param env
   */
  case class Delete(name: String, env: Environment = Default)

  case object DeleteSuccess

  /**
   * Success => DeleteAllSuccess
   */
  case object DeleteAll

  case object DeleteAllSuccess

  /**
   * Success => TrieMap[(String, Environment), (Client, ActorRef)]
   */
  case object GetAll
}

object HttpClientActorMessage {

  /**
   * Success => HttpClientActor
   * @param config
   */
  case class UpdateConfig(config: Configuration)
<<<<<<< HEAD
=======

  /**
   * Success => HttpClientActor
   * @param settings
   */
  case class UpdateSettings(settings: Settings)

  /**
   * Success => HttpClientActor
   * @param pipeline
   */
  case class UpdatePipeline(pipeline: Option[Pipeline])
>>>>>>> 1. separate Settings & Pipeline from Configuration

<<<<<<< HEAD
  /**
   * Success => HttpClientActor
   * @param settings
   */
  case class UpdateSettings(settings: Settings)

  /**
   * Success => HttpClientActor
   * @param pipeline
   */
  case class UpdatePipeline(pipeline: Option[SimplePipelineConfig])

=======
>>>>>>> refractoring the code SQUBS-504
  /**
   * Success => MarkDownSuccess
   */
  case object MarkDown

  case object MarkDownSuccess

  /**
   * Success => MarkUpSuccess
   */
  case object MarkUp

  case object MarkUpSuccess


  /**
   * Success => CloseSuccess
   */
  case object Close

  case object CloseSuccess

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Get(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Options(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Head(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Delete(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)


  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   * @param content
   * @param marshaller
   * @tparam T
   */
<<<<<<< HEAD
  case class Post[T](uri: String, content: Option[T],
                     marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                     requestSettings: RequestSettings = Configuration.defaultRequestSettings)
=======
  case class Post[T <: AnyRef](uri: String, content: T,
                               marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                               requestSettings: RequestSettings = Configuration.defaultRequestSettings)
>>>>>>> 1. separate Settings & Pipeline from Configuration

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   * @param content
   * @param marshaller
   * @tparam T
   */
<<<<<<< HEAD
  case class Put[T](uri: String, content: Option[T],
                    marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                    requestSettings: RequestSettings = Configuration.defaultRequestSettings)
=======
  case class Put[T <: AnyRef](uri: String, content: T,
                              marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                              requestSettings: RequestSettings = Configuration.defaultRequestSettings)
>>>>>>> 1. separate Settings & Pipeline from Configuration
}<commit_msg>update httpclient<commit_after>/*
 * Licensed to Typesafe under one or more contributor license agreements.
 * See the CONTRIBUTING file distributed with this work for
 * additional information regarding copyright ownership.
 * This file is licensed to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.squbs.httpclient

import org.squbs.httpclient.env.{Default, Environment}
import org.squbs.httpclient.json.Json4sJacksonNoTypeHintsProtocol
import org.squbs.proxy.SimplePipelineConfig
import spray.httpx.marshalling.Marshaller

object HttpClientManagerMessage {

  /**
   * Success => HttpClientActor
   * @param name
   * @param env
   */
  case class Get(name: String, env: Environment = Default)

  /**
   * Success => DeleteSuccess
   * Failure => HttpClientNotExistException
   * @param name
   * @param env
   */
  case class Delete(name: String, env: Environment = Default)

  case object DeleteSuccess

  /**
   * Success => DeleteAllSuccess
   */
  case object DeleteAll

  case object DeleteAllSuccess

  /**
   * Success => TrieMap[(String, Environment), (Client, ActorRef)]
   */
  case object GetAll
}

object HttpClientActorMessage {

  /**
   * Success => HttpClientActor
   * @param config
   */
  case class UpdateConfig(config: Configuration)

  /**
   * Success => HttpClientActor
   * @param settings
   */
  case class UpdateSettings(settings: Settings)

  /**
   * Success => HttpClientActor
   * @param pipeline
   */
  case class UpdatePipeline(pipeline: Option[SimplePipelineConfig])

  /**
   * Success => MarkDownSuccess
   */
  case object MarkDown

  case object MarkDownSuccess

  /**
   * Success => MarkUpSuccess
   */
  case object MarkUp

  case object MarkUpSuccess


  /**
   * Success => CloseSuccess
   */
  case object Close

  case object CloseSuccess

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Get(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Options(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Head(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   */
  case class Delete(uri: String, requestSettings: RequestSettings = Configuration.defaultRequestSettings)


  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   * @param content
   * @param marshaller
   * @tparam T
   */
  case class Post[T](uri: String, content: Option[T],
                     marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                     requestSettings: RequestSettings = Configuration.defaultRequestSettings)

  /**
   * Success => HttpResponse
   * Failure => Throwable
   * @param uri
   * @param content
   * @param marshaller
   * @tparam T
   */
  case class Put[T](uri: String, content: Option[T],
                    marshaller: Marshaller[T] = Json4sJacksonNoTypeHintsProtocol.json4sMarshaller,
                    requestSettings: RequestSettings = Configuration.defaultRequestSettings)
}
{'fraction_non_alphanumeric': 0.1023648273565005, 'fraction_numerical': 0.003663817031197957, 'mean_word_length': 3.330769230769231, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '832371', 'n_tokens_mistral': 2490, 'n_tokens_neox': 2389, 'n_words': 721}