text:
class CBlockIndex;

class CProRegTx
{
public:
    static const uint16_t CURRENT_VERSION = 1;

public:
    uint16_t nVersion{CURRENT_VERSION};                    // message version
    uint16_t nType{0};                                     // only 0 supported for now
    uint16_t nMode{0};                                     // only 0 supported for now
    COutPoint collateralOutpoint{uint256(), (uint32_t)-1}; // if hash is null, we refer to a ProRegTx output
    CService addr;
    CKeyID keyIDOwner;
    CBLSPublicKey pubKeyOperator;
    CKeyID keyIDVoting;
    uint16_t nOperatorReward{0};
    CScript scriptPayout;
    uint256 inputsHash; // replay protection
    std::vector<unsigned char> vchSig;

public:
    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action)
    {
        READWRITE(nVersion);
        READWRITE(nType);
        READWRITE(nMode);
        READWRITE(collateralOutpoint);
        READWRITE(addr);
        READWRITE(keyIDOwner);
        READWRITE(pubKeyOperator);
        READWRITE(keyIDVoting);
        READWRITE(nOperatorReward);
        READWRITE(scriptPayout);
        READWRITE(inputsHash);
        if (!(s.GetType() & SER_GETHASH)) {
            READWRITE(vchSig);
        }
    }

    // When signing with the collateral key, we don't sign the hash but a generated message instead
    // This is needed for HW wallet support which can only sign text messages as of now
    std::string MakeSignString() const;

    std::string ToString() const;

    void ToJson(UniValue& obj) const
    {
        obj.clear();
        obj.setObject();
        obj.push_back(Pair("version", nVersion));
        obj.push_back(Pair("collateralHash", collateralOutpoint.hash.ToString()));
        obj.push_back(Pair("collateralIndex", (int)collateralOutpoint.n));
        obj.push_back(Pair("service", addr.ToString(false)));
        obj.push_back(Pair("ownerAddress", CBitcoinAddress(keyIDOwner).ToString()));
        obj.push_back(Pair("votingAddress", CBitcoinAddress(keyIDVoting).ToString()));

        CTxDestination dest;
        if (ExtractDestination(scriptPayout, dest)) {
            CBitcoinAddress bitcoinAddress(dest);
            obj.push_back(Pair("payoutAddress", bitcoinAddress.ToString()));
        }
        obj.push_back(Pair("pubKeyOperator", pubKeyOperator.ToString()));
        obj.push_back(Pair("operatorReward", (double)nOperatorReward / 100));

        obj.push_back(Pair("inputsHash", inputsHash.ToString()));
    }
};

class CProUpServTx
{
public:
    static const uint16_t CURRENT_VERSION = 1;

public:
    uint16_t nVersion{CURRENT_VERSION}; // message version
    uint256 proTxHash;
    CService addr;
    CScript scriptOperatorPayout;
    uint256 inputsHash; // replay protection
    CBLSSignature sig;

public:
    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action)
    {
        READWRITE(nVersion);
        READWRITE(proTxHash);
        READWRITE(addr);
        READWRITE(scriptOperatorPayout);
        READWRITE(inputsHash);
        if (!(s.GetType() & SER_GETHASH)) {
            READWRITE(sig);
        }
    }

public:
    std::string ToString() const;

    void ToJson(UniValue& obj) const
    {
        obj.clear();
        obj.setObject();
        obj.push_back(Pair("version", nVersion));
        obj.push_back(Pair("proTxHash", proTxHash.ToString()));
        obj.push_back(Pair("service", addr.ToString(false)));
        CTxDestination dest;
        if (ExtractDestination(scriptOperatorPayout, dest)) {
            CBitcoinAddress bitcoinAddress(dest);
            obj.push_back(Pair("operatorPayoutAddress", bitcoinAddress.ToString()));
        }
        obj.push_back(Pair("inputsHash", inputsHash.ToString()));
    }
};

class CProUpRegTx
{
public:
    static const uint16_t CURRENT_VERSION = 1;

public:
    uint16_t nVersion{CURRENT_VERSION}; // message version
    uint256 proTxHash;
    uint16_t nMode{0}; // only 0 supported for now
    CBLSPublicKey pubKeyOperator;
    CKeyID keyIDVoting;
    CScript scriptPayout;
    uint256 inputsHash; // replay protection
    std::vector<unsigned char> vchSig;

public:
    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action)
    {
        READWRITE(nVersion);
        READWRITE(proTxHash);
        READWRITE(nMode);
        READWRITE(pubKeyOperator);
        READWRITE(keyIDVoting);
        READWRITE(scriptPayout);
        READWRITE(inputsHash);
        if (!(s.GetType() & SER_GETHASH)) {
            READWRITE(vchSig);
        }
    }

public:
    std::string ToString() const;

    void ToJson(UniValue& obj) const
    {
        obj.clear();
        obj.setObject();
        obj.push_back(Pair("version", nVersion));
        obj.push_back(Pair("proTxHash", proTxHash.ToString()));
        obj.push_back(Pair("votingAddress", CBitcoinAddress(keyIDVoting).ToString()));
        CTxDestination dest;
        if (ExtractDestination(scriptPayout, dest)) {
            CBitcoinAddress bitcoinAddress(dest);
            obj.push_back(Pair("payoutAddress", bitcoinAddress.ToString()));
        }
        obj.push_back(Pair("pubKeyOperator", pubKeyOperator.ToString()));
        obj.push_back(Pair("inputsHash", inputsHash.ToString()));
    }
};

class CProUpRevTx
{
public:
    static const uint16_t CURRENT_VERSION = 1;

    // these are just informational and do not have any effect on the revocation
    enum {
        REASON_NOT_SPECIFIED = 0,
        REASON_TERMINATION_OF_SERVICE = 1,
        REASON_COMPROMISED_KEYS = 2,
        REASON_CHANGE_OF_KEYS = 3,
        REASON_LAST = REASON_CHANGE_OF_KEYS
    };

public:
    uint16_t nVersion{CURRENT_VERSION}; // message version
    uint256 proTxHash;
    uint16_t nReason{REASON_NOT_SPECIFIED};
    uint256 inputsHash; // replay protection
    CBLSSignature sig;

public:
    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action)
    {
        READWRITE(nVersion);
        READWRITE(proTxHash);
        READWRITE(nReason);
        READWRITE(inputsHash);
        if (!(s.GetType() & SER_GETHASH)) {
            READWRITE(sig);
        }
    }

public:
    std::string ToString() const;

    void ToJson(UniValue& obj) const
    {
        obj.clear();
        obj.setObject();
        obj.push_back(Pair("version", nVersion));
        obj.push_back(Pair("proTxHash", proTxHash.ToString()));
        obj.push_back(Pair("reason", (int)nReason));
        obj.push_back(Pair("inputsHash", inputsHash.ToString()));
    }
};

bool CheckProRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state);
bool CheckProUpServTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state);
bool CheckProUpRegTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state);
bool CheckProUpRevTx(const CTransaction& tx, const CBlockIndex* pindexPrev, CValidationState& state);

#endif //ION_PROVIDERTX_H


text:
package iso20022

// Specifies the details relative to the submission of the certificate data set.
type RequiredSubmission5 struct {

	// Specifies with party(ies) is authorised to submit the data set as part of the transaction.
	Submitter []*BICIdentification1 `xml:"Submitr"`

	// Specifies the type of the certificate.
	CertificateType *TradeCertificateType2Code `xml:"CertTp"`
}

func (r *RequiredSubmission5) AddSubmitter() *BICIdentification1 {
	newValue := new(BICIdentification1)
	r.Submitter = append(r.Submitter, newValue)
	return newValue
}

func (r *RequiredSubmission5) SetCertificateType(value string) {
	r.CertificateType = (*TradeCertificateType2Code)(&value)
}

redpajama_set_name: RedPajamaGithub


text:
package com.github.ligangty.scala.jsoup.helper

import java.io._
import java.net._
import java.nio.ByteBuffer
import java.nio.charset.{IllegalCharsetNameException, Charset}
import java.security.cert.X509Certificate
import java.security.{KeyManagementException, NoSuchAlgorithmException, SecureRandom}
import java.util.zip.GZIPInputStream
import javax.net.ssl._

import com.github.ligangty.scala.jsoup.helper.HttpConnection.KeyVal
import com.github.ligangty.scala.jsoup.helper.Validator._
import com.github.ligangty.scala.jsoup.nodes.Document
import com.github.ligangty.scala.jsoup.parser.{Parser, TokenQueue}
import com.github.ligangty.scala.jsoup.{Connection, HttpStatusException, UnsupportedMimeTypeException}

import scala.collection.mutable
import scala.util.matching.Regex

class HttpConnection private() extends Connection {

  private var req: Connection.Request = new HttpConnection.Request
  private var res: Connection.Response = new HttpConnection.Response

  override def url(url: URL): Connection = {
    req.url(url)
    this
  }

  override def url(url: String): Connection = {
    Validator.notEmpty(url, "Must supply a valid URL")
    try {
      req.url(new URL(HttpConnection.encodeUrl(url)))
    } catch {
      case e: MalformedURLException =>
        throw new IllegalArgumentException("Malformed URL: " + url, e)
    }
    this
  }

  override def userAgent(userAgent: String): Connection = {
    Validator.notNull(userAgent, "User agent must not be null")
    req.header("User-Agent", userAgent)
    this
  }

  override def timeout(millis: Int): Connection = {
    req.timeout(millis)
    this
  }

  override def maxBodySize(bytes: Int): Connection = {
    req.maxBodySize(bytes)
    this
  }

  override def followRedirects(followRedirects: Boolean): Connection = {
    req.followRedirects(followRedirects)
    this
  }

  override def referrer(referrer: String): Connection = {
    Validator.notNull(referrer, "Referrer must not be null")
    req.header("Referer", referrer)
    this
  }

  override def method(method: Connection.Method.Method): Connection = {
    req.method(method)
    this
  }

  override def ignoreHttpErrors(ignoreHttpErrors: Boolean): Connection = {
    req.ignoreHttpErrors(ignoreHttpErrors)
    this
  }

  override def ignoreContentType(ignoreContentType: Boolean): Connection = {
    req.ignoreContentType(ignoreContentType)
    this
  }

  override def validateTLSCertificates(value: Boolean): Connection = {
    req.validateTLSCertificates(value)
    this
  }

  override def data(key: String, value: String): Connection = {
    req.data(KeyVal.create(key, value))
    this
  }

  override def data(key: String, filename: String, inputStream: InputStream): Connection = {
    req.data(KeyVal.create(key, filename, inputStream))
    this
  }

  override def data(data: Map[String, String]): Connection = {
    Validator.notNull(data, "Data map must not be null")
    data.foreach({ case (key, value) => req.data(KeyVal.create(key, value))})
    this
  }

  override def data(keyvals: String*): Connection = {
    Validator.notNull(keyvals, "Data key value pairs must not be null")
    Validator.isTrue(keyvals.length % 2 == 0, "Must supply an even number of key value pairs")
    var i = 0
    val length = keyvals.length
    while (i < length) {
      val key: String = keyvals(i)
      val value: String = keyvals(i + 1)
      Validator.notEmpty(key, "Data key must not be empty")
      Validator.notNull(value, "Data value must not be null")
      req.data(KeyVal.create(key, value))
      i += 2
    }
    this
  }

  override def data(data: Traversable[Connection.KeyVal]): Connection = {
    Validator.notNull(data, "Data collection must not be null")
    data.foreach(entry => req.data(entry))
    this
  }

  override def header(name: String, value: String): Connection = {
    req.header(name, value)
    this
  }

  override def cookie(name: String, value: String): Connection = {
    req.cookie(name, value)
    this
  }

  override def cookies(cookies: Map[String, String]): Connection = {
    Validator.notNull(cookies, "Cookie map must not be null")
    cookies.foreach({ case (key, value) => req.cookie(key, value)})
    this
  }

  override def parser(parser: Parser): Connection = {
    req.parser(parser)
    this
  }

  @throws(classOf[IOException])
  override def get: Document = {
    req.method(Connection.Method.GET())
    execute
    res.parse
  }

  @throws(classOf[IOException])
  override def post: Document = {
    req.method(Connection.Method.POST())
    execute
    res.parse
  }

  @throws(classOf[IOException])
  override def execute: Connection.Response = {
    res = HttpConnection.Response.execute(req)
    res
  }

  override def request: Connection.Request = {
    req
  }

  override def request(request: Connection.Request): Connection = {
    req = request
    this
  }

  override def response: Connection.Response = {
    res
  }

  override def response(response: Connection.Response): Connection = {
    res = response
    this
  }
}

object HttpConnection {

  val CONTENT_ENCODING: String = "Content-Encoding"
  private val CONTENT_TYPE: String = "Content-Type"
  private val MULTIPART_FORM_DATA: String = "multipart/form-data"
  private val FORM_URL_ENCODED: String = "application/x-www-form-urlencoded"

  def connect(url: String): Connection = {
    val con: Connection = new HttpConnection
    con.url(url)
    con
  }

  def connect(url: URL): Connection = {
    val con: Connection = new HttpConnection
    con.url(url)
    con
  }

  private def encodeUrl(url: String): String = {
    if (url == null) {
      return null
    }
    url.replaceAll(" ", "%20")
  }

  private def encodeMimeName(value: String): String = {
    if (value == null) {
      return null
    }
    value.replaceAll("\"", "%22")
  }

  private[HttpConnection] abstract class Base[T <: Connection.Base[T]] protected extends Connection.Base[T] {

    protected[helper] var urlVal: URL = null
    protected[helper] var methodVal: Connection.Method.Method = null
    protected[helper] var headersMap: mutable.Map[String, String] = new mutable.LinkedHashMap[String, String]
    protected[helper] var cookiesMap: mutable.Map[String, String] = new mutable.LinkedHashMap[String, String]

    def url: URL = {
      urlVal
    }

    def url(url: URL): T = {
      notNull(url, "URL must not be null")
      this.urlVal = url
      this.asInstanceOf[T]
    }

    def method: Connection.Method.Method = {
      methodVal
    }

    def method(method: Connection.Method.Method): T = {
      notNull(method, "Method must not be null")
      this.methodVal = method
      this.asInstanceOf[T]
    }

    def header(name: String): String = {
      notNull(name, "Header name must not be null")
      getHeaderCaseInsensitive(name)
    }

    def header(name: String, value: String): T = {
      notEmpty(name, "Header name must not be empty")
      notNull(value, "Header value must not be null")
      removeHeader(name)
      headersMap.put(name, value)
      this.asInstanceOf[T]
    }

    def hasHeader(name: String): Boolean = {
      notEmpty(name, "Header name must not be empty")
      getHeaderCaseInsensitive(name) != null
    }

    /**
     * Test if the request has a header with this value (case insensitive).
     */
    def hasHeaderWithValue(name: String, value: String): Boolean = {
      hasHeader(name) && header(name).equalsIgnoreCase(value)
    }

    def removeHeader(name: String): T = {
      notEmpty(name, "Header name must not be empty")
      val entry = scanHeaders(name)
      if (entry != null) {
        headersMap.remove(entry._1)
      }
      this.asInstanceOf[T]
    }

    def headers: mutable.Map[String, String] = headersMap

    private def getHeaderCaseInsensitive(name: String): String = {
      notNull(name, "Header name must not be null")
      headersMap.get(name) match {
        case Some(valu) => return valu
        case None =>
          headersMap.get(name.toLowerCase) match {
            case Some(valu) => return valu
            case None =>
              val entry = scanHeaders(name)
              if (entry != null) {
                return entry._2
              }
          }
      }
      null
    }

    private def scanHeaders(name: String): (String, String) = {
      val lc: String = name.toLowerCase
      for (entry <- headersMap if entry._1.toLowerCase == lc) {
        return entry
      }
      null
    }

    def cookie(name: String): String = {
      notEmpty(name, "Cookie name must not be empty")
      cookiesMap(name)
    }

    def cookie(name: String, value: String): T = {
      notEmpty(name, "Cookie name must not be empty")
      notNull(value, "Cookie value must not be null")
      cookiesMap.put(name, value)
      this.asInstanceOf[T]
    }

    def hasCookie(name: String): Boolean = {
      notEmpty(name, "Cookie name must not be empty")
      cookiesMap.keys.exists(_ == name)
    }

    def removeCookie(name: String): T = {
      notEmpty(name, "Cookie name must not be empty")
      cookiesMap.remove(name)
      this.asInstanceOf[T]
    }

    def cookies: Map[String, String] = cookiesMap.toMap
  }

  object KeyVal {

    def create(key: String, value: String): HttpConnection.KeyVal = {
      new HttpConnection.KeyVal().key(key).value(value)
    }

    def create(key: String, filename: String, stream: InputStream): HttpConnection.KeyVal = {
      new HttpConnection.KeyVal().key(key).value(filename).inputStream(stream)
    }
  }

  class Request private[HttpConnection]() extends HttpConnection.Base[Connection.Request]() with Connection.Request {

    this.methodVal = Connection.Method.GET()
    headersMap.put("Accept-Encoding", "gzip")

    private var timeoutMilliseconds: Int = 3000
    // 1MB
    private var maxBodySizeBytes: Int = 1024 * 1024
    private var followRedirectsVal: Boolean = true
    private var dataVal: mutable.Buffer[Connection.KeyVal] = new mutable.ArrayBuffer[Connection.KeyVal]
    private var ignoreHttpErrorsVal: Boolean = false
    private var ignoreContentTypeVal: Boolean = false
    private var parserVal: Parser = Parser.htmlParser
    private var ValidatorTSLCertificatesVal: Boolean = true
    private var postDataCharsetVal: String = DataUtil.defaultCharset

    def timeout: Int = {
      timeoutMilliseconds
    }

    def timeout(millis: Int): HttpConnection.Request = {
      isTrue(millis >= 0, "Timeout milliseconds must be 0 (infinite) or greater")
      timeoutMilliseconds = millis
      this
    }

    def maxBodySize: Int = {
      maxBodySizeBytes
    }

    def maxBodySize(bytes: Int): Connection.Request = {
      isTrue(bytes >= 0, "maxSize must be 0 (unlimited) or larger")
      maxBodySizeBytes = bytes
      this
    }

    def followRedirects: Boolean = {
      followRedirectsVal
    }

    def followRedirects(followRedirects: Boolean): Connection.Request = {
      this.followRedirectsVal = followRedirects
      this
    }

    def ignoreHttpErrors: Boolean = {
      ignoreHttpErrorsVal
    }

    def validateTLSCertificates: Boolean = {
      ValidatorTSLCertificatesVal
    }

    def validateTLSCertificates(value: Boolean) {
      ValidatorTSLCertificatesVal = value
    }

    def ignoreHttpErrors(ignoreHttpErrors: Boolean): Connection.Request = {
      this.ignoreHttpErrorsVal = ignoreHttpErrors
      this
    }

    def ignoreContentType: Boolean = {
      ignoreContentTypeVal
    }

    def ignoreContentType(ignoreContentType: Boolean): Connection.Request = {
      this.ignoreContentTypeVal = ignoreContentType
      this
    }

    def data(keyval: Connection.KeyVal): HttpConnection.Request = {
      notNull(keyval, "Key val must not be null")
      dataVal.append(keyval)
      this
    }

    override def data: mutable.Buffer[Connection.KeyVal] = dataVal

    def parser(parser: Parser): HttpConnection.Request = {
      this.parserVal = parser
      this
    }

    def parser: Parser = {
      parserVal
    }

    def postDataCharset(charset: String): Connection.Request = {
      Validator.notNull(charset, "Charset must not be null")
      if (!Charset.isSupported(charset)) {
        throw new IllegalCharsetNameException(charset)
      }
      this.postDataCharsetVal = charset
      this
    }

    def postDataCharset: String = {
      postDataCharsetVal
    }

  }

  object Response {

    private[Response] val MAX_REDIRECTS: Int = 20
    private[Response] var sslSocketFactory: SSLSocketFactory = null
    private[Response] val LOCATION: String = "Location"
    /*
     * For example {{{application/atom+xml;charsetVal=utf-8}}}.
     * Stepping through it: start with "application/", follow with word
     * characters up to a "+xml", and then maybe more (.*).
     */
    private[Response] val xmlContentTypeRxp: Regex = """application/\w+\+xml.*""".r

    @throws(classOf[IOException])
    private[helper] def execute(req: Connection.Request): HttpConnection.Response = {
      execute(req, null)
    }

    @throws(classOf[IOException])
    private[helper] def execute(req: Connection.Request, previousResponse: HttpConnection.Response): HttpConnection.Response = {
      Validator.notNull(req, "Request must not be null")
      val protocol: String = req.url.getProtocol
      if (!(protocol == "http") && !(protocol == "https")) {
        throw new MalformedURLException("Only http & https protocols supported")
      }
      // set up the request for execution
      var mimeBoundary: String = null
      if (!req.method.hasBody && req.data.size > 0) {
        serialiseRequestUrl(req) // appends query string
      } else if (req.method.hasBody) {
        mimeBoundary = setOutputContentType(req)
      }
      val conn: HttpURLConnection = createConnection(req)
      var res: HttpConnection.Response = null
      try {
        conn.connect()
        if (conn.getDoOutput) {
          writePost(req, conn.getOutputStream, mimeBoundary)
        }
        val status: Int = conn.getResponseCode
        res = new HttpConnection.Response(previousResponse)
        res.setupFromConnection(conn, previousResponse)
        res.req = req
        // redirect if there's a location header (from 3xx, or 201 etc)
        if (res.hasHeader(LOCATION) && req.followRedirects) {
          // always redirect with a get. any data param from original req are dropped.
          req.method(Connection.Method.GET())
          req.data.clear()
          var location: String = res.header(LOCATION)
          // fix broken Location: http:/temp/AAG_New/en/index.php
          if (location != null && location.startsWith("http:/") && location.charAt(6) != '/') {
            location = location.substring(6)
          }
          req.url(new URL(req.url, encodeUrl(location)))
          // add response cookies to request (for e.g. login posts)
          res.cookies.foreach({ case (key, value) => req.cookie(key, value)})
          return execute(req, res)
        }
        if ((status < 200 || status >= 400) && !req.ignoreHttpErrors) {
          throw new HttpStatusException("HTTP error fetching URL", status, req.url.toString)
        }
        // check that we can handle the returned content type; if not, abort before fetching it
        val contentType: String = res.contentTypeVal
        if (contentType != null &&
                !req.ignoreContentType &&
                !contentType.startsWith("text/") &&
                !contentType.startsWith("application/xml") &&
                xmlContentTypeRxp.findFirstIn(contentType).isEmpty) {
          throw new UnsupportedMimeTypeException("Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml", contentType, req.url.toString)
        }
        res.charsetVal = DataUtil.getCharsetFromContentType(res.contentTypeVal)
        if (conn.getContentLength() != 0) {
          // -1 means unknown, chunked. sun throws an IO exception on 500 response with no content when trying to read body

          var bodyStream: InputStream = null
          var dataStream: InputStream = null
          try {
            dataStream = if (conn.getErrorStream != null) {
              conn.getErrorStream
            } else {
              conn.getInputStream
            }
            bodyStream = if (res.hasHeaderWithValue(CONTENT_ENCODING, "gzip")) {
              new BufferedInputStream(new GZIPInputStream(dataStream))
            } else {
              new BufferedInputStream(dataStream)
            }
            res.byteData = DataUtil.readToByteBuffer(bodyStream, req.maxBodySize)
          } finally {
            if (bodyStream != null) {
              bodyStream.close()
            }
            if (dataStream != null) {
              dataStream.close()
            }
          }
        } else {
          res.byteData = DataUtil.emptyByteBuffer
        }
      } finally {
        // per Java's documentation, this is not necessary, and precludes keepalives. However in practise,
        // connection errors will not be released quickly enough and can cause a too many open files error.
        conn.disconnect()
      }
      res.executed = true
      res
    }

    // set up connection defaults, and details from request
    @throws(classOf[IOException])
    private[Response] def createConnection(req: Connection.Request): HttpURLConnection = {
      val conn: HttpURLConnection = req.url.openConnection.asInstanceOf[HttpURLConnection]
      conn.setRequestMethod(req.method.name)
      conn.setInstanceFollowRedirects(false) // don't rely on native redirection support
      conn.setConnectTimeout(req.timeout)
      conn.setReadTimeout(req.timeout)
      conn match {
        case con: HttpsURLConnection =>
          if (!req.validateTLSCertificates) {
            initUnSecureTSL()
            con.setSSLSocketFactory(sslSocketFactory)
            con.setHostnameVerifier(getInsecureVerifier)
          }
        case _ =>
      }
      if (req.method.hasBody) {
        conn.setDoOutput(true)
      }
      if (req.cookies.size > 0) {
        conn.addRequestProperty("Cookie", getRequestCookieString(req))
      }
      req.headers.foreach({ case (key, value) => conn.addRequestProperty(key, value)})
      conn
    }

    /**
     * Instantiate Hostname Verifier that does nothing.
     * This is used for connections with disabled SSL certificates validation.
     *
     * @return Hostname Verifier that does nothing and accepts all hostnames
     */
    private[Response] def getInsecureVerifier: HostnameVerifier = {
      new HostnameVerifier {
        def verify(urlHostName: String, session: SSLSession): Boolean = {
          true
        }
      }
    }

    /**
     * Initialise Trust manager that does not validate certificate chains and
     * add it to current SSLContext.
     *

     * please not that this method will only perform action if sslSocketFactory is not yet
     * instantiated.
     *
     * @throws IOException io exception
     */
    @throws(classOf[IOException])
    private[Response] def initUnSecureTSL(): Unit = {
      if (sslSocketFactory == null) {
        // Create a trust manager that does not validate certificate chains
        val trustAllCerts: Array[TrustManager] = Array[TrustManager](new X509TrustManager {
          def checkClientTrusted(chain: Array[X509Certificate], authType: String) {}

          def checkServerTrusted(chain: Array[X509Certificate], authType: String) {}

          def getAcceptedIssuers: Array[X509Certificate] = {
            null
          }
        })
        // Install the all-trusting trust manager
        var sslContext: SSLContext = null
        try {
          sslContext = SSLContext.getInstance("SSL")
          sslContext.init(null, trustAllCerts, new SecureRandom())
          // Create an ssl socket factory with our all-trusting manager
          sslSocketFactory = sslContext.getSocketFactory
        } catch {
          case e: NoSuchAlgorithmException =>
            throw new IOException("Can't create unsecure trust manager")
          case e: KeyManagementException =>
            throw new IOException("Can't create unsecure trust manager")
        }
      }
    }

    private def setOutputContentType(req: Connection.Request): String = {
      // multipart mode, for files. add the header if we see something with an inputstream, and return a non-null boundary
      var needsMulti: Boolean = false
      import scala.util.control.Breaks._
      breakable {
        for (keyVal <- req.data if keyVal.hasInputStream) {
          needsMulti = true
          break()
        }
      }
      var bound: String = null
      if (needsMulti) {
        bound = DataUtil.mimeBoundary
        req.header(CONTENT_TYPE, MULTIPART_FORM_DATA + "; boundary=" + bound)
      } else {
        req.header(CONTENT_TYPE, FORM_URL_ENCODED + "; charset=" + req.postDataCharset)
      }
      bound
    }

    @throws(classOf[IOException])
    private def writePost(req: Connection.Request, outputStream: OutputStream, bound: String) {
      val data: mutable.Buffer[Connection.KeyVal] = req.data
      val w: BufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream, DataUtil.defaultCharset))
      if (bound != null) {
        // boundary will be set if we're in multipart mode
        var i = 0
        val length = data.length
        var keyVal: Connection.KeyVal = null
        while (i < length) {
          keyVal = data(i)
          w.write("--")
          w.write(bound)
          w.write("\r\n")
          w.write("Content-Disposition: form-data; name=\"")
          w.write(encodeMimeName(keyVal.key)) // encodes " to %22
          w.write("\"")
          if (keyVal.hasInputStream) {
            w.write("; filename=\"")
            w.write(encodeMimeName(keyVal.value))
            w.write("\"\r\nContent-Type: application/octet-stream\r\n\r\n")
            w.flush()
            DataUtil.crossStreams(keyVal.inputStream, outputStream)
            outputStream.flush()
          } else {
            w.write("\r\n\r\n")
            w.write(keyVal.value)
          }
          w.write("\r\n")
          i += 1
        }
        w.write("--")
        w.write(bound)
        w.write("--")
      } else {
        // regular form data (application/x-www-form-urlencoded)
        var first: Boolean = true
        var i = 0
        val length = data.length
        var keyVal: Connection.KeyVal = null
        while (i < length) {
          keyVal = data(i)
          if (!first) {
            w.append('&')
          } else {
            first = false
          }
          w.write(URLEncoder.encode(keyVal.key, req.postDataCharset))
          w.write('=')
          w.write(URLEncoder.encode(keyVal.value, req.postDataCharset))
          i += 1
        }
      }
      w.close()
    }

    private def getRequestCookieString(req: Connection.Request): String = {
      val sb: StringBuilder = new StringBuilder
      var first: Boolean = true
      for (cookie <- req.cookies) {
        if (!first) {
          sb.append("; ")
        } else {
          first = false
        }
        sb.append(cookie._1).append('=').append(cookie._2)
        // todo: spec says only ascii, no escaping / encoding defined. validate on set? or escape somehow here?
      }
      sb.toString()
    }

    @throws(classOf[IOException])
    private def serialiseRequestUrl(req: Connection.Request) {
      val in: URL = req.url
      val url: StringBuilder = new StringBuilder
      var first: Boolean = true
      // reconstitute the query, ready for appends
      url.append(in.getProtocol).append("://").append(in.getAuthority).append(in.getPath).append("?")
      if (in.getQuery != null) {
        url.append(in.getQuery)
        first = false
      }
      for (keyVal <- req.data) {
        if (!first) {
          url.append('&')
        } else {
          first = false
        }
        url.append(URLEncoder.encode(keyVal.key, DataUtil.defaultCharset)).append('=').append(URLEncoder.encode(keyVal.value, DataUtil.defaultCharset))
      }
      req.url(new URL(url.toString()))
      req.data.clear()
    }
  }

  class Response private[helper]() extends HttpConnection.Base[Connection.Response] with Connection.Response {

    private var statusCodeVal: Int = 0
    private var statusMessageVal: String = null
    private var byteData: ByteBuffer = null
    private var charsetVal: String = null
    private var contentTypeVal: String = null
    private var executed: Boolean = false
    private var numRedirects: Int = 0
    private var req: Connection.Request = null

    @throws(classOf[IOException])
    private def this(previousResponse: HttpConnection.Response) {
      this()
      if (previousResponse != null) {
        numRedirects = previousResponse.numRedirects + 1
        if (numRedirects >= Response.MAX_REDIRECTS) {
          throw new IOException("Too many redirects occurred trying to load URL %s".format(previousResponse.url))
        }
      }
    }

    def statusCode: Int = {
      statusCodeVal
    }

    def statusMessage: String = {
      statusMessageVal
    }

    def charset: String = {
      charsetVal
    }

    def contentType: String = {
      contentTypeVal
    }

    @throws(classOf[IOException])
    def parse: Document = {
      Validator.isTrue(executed, "Request must be executed (with .execute(), .get(), or .post() before parsing response")
      val doc: Document = DataUtil.parseByteData(byteData, charsetVal, url.toExternalForm, req.parser)
      byteData.rewind
      charsetVal = doc.outputSettings.charset.name // update charset from meta-equiv, possibly
      doc
    }

    def body: String = {
      Validator.isTrue(executed, "Request must be executed (with .execute(), .get(), or .post() before getting response body")
      // charset gets set from header on execute, and from meta-equiv on parse. parse may not have happened yet
      var body: String = null
      if (charsetVal == null) {
        body = Charset.forName(DataUtil.defaultCharset).decode(byteData).toString
      } else {
        body = Charset.forName(charset).decode(byteData).toString
      }
      byteData.rewind
      body
    }

    def bodyAsBytes: Array[Byte] = {
      Validator.isTrue(executed, "Request must be executed (with .execute(), .get(), or .post() before getting response body")
      byteData.array
    }

    @throws(classOf[IOException])
    private def setupFromConnection(conn: HttpURLConnection, previousResponse: Connection.Response) {
      methodVal = Connection.Method.valueOf(conn.getRequestMethod)
      urlVal = conn.getURL
      statusCodeVal = conn.getResponseCode
      statusMessageVal = conn.getResponseMessage
      contentTypeVal = conn.getContentType
      import scala.collection.JavaConversions._
      val resHeaders = conn.getHeaderFields.toMap
      processResponseHeaders(resHeaders)
      // if from a redirect, map previous response cookies into this response
      if (previousResponse != null) {
        previousResponse.cookies
                .filter(prevCookie => !hasCookie(prevCookie._1))
                .foreach({ case (key, value) => cookie(key, value)})
      }
    }

    private[helper] def processResponseHeaders(resHeaders: Map[String, java.util.List[String]]) {
      import scala.util.control.Breaks

      for (entry <- resHeaders) {
        val continue = new Breaks
        continue.breakable {
          val name: String = entry._1
          if (name == null) {
            continue.break() // http/1.1 line
          }
          import scala.collection.JavaConversions._
          val values: List[String] = entry._2.toList
          if (name.equalsIgnoreCase("Set-Cookie")) {
            for (value <- values) {
              val inContinue = new Breaks
              inContinue.breakable {
                if (value == null) {
                  inContinue.break()
                }
                val cd: TokenQueue = new TokenQueue(value)
                val cookieName: String = cd.chompTo("=").trim
                var cookieVal: String = cd.consumeTo(";").trim
                if (cookieVal == null) {
                  cookieVal = ""
                }
                // ignores path, date, domain, validateTLSCertificates et al. req'd?
                // name not blank, value not null
                if (cookieName != null && cookieName.length > 0) {
                  cookie(cookieName, cookieVal)
                }
              }
            }
          } else {
            // only take the first instance of each header
            if (values.nonEmpty) {
              header(name, values.head)
            }
          }
        }
      }
    }
  }

  class KeyVal private[HttpConnection]() extends Connection.KeyVal {

    private var keyVal: String = null
    private var valueVal: String = null
    private var stream: InputStream = null

    def key(key: String): HttpConnection.KeyVal = {
      notEmpty(key, "Data keyVal must not be empty")
      this.keyVal = key
      this
    }

    def key: String = {
      keyVal
    }

    def value(value: String): HttpConnection.KeyVal = {
      notNull(value, "Data valueVal must not be null")
      this.valueVal = value
      this
    }

    def value: String = {
      valueVal
    }

    def inputStream(inputStream: InputStream): HttpConnection.KeyVal = {
      notNull(valueVal, "Data input stream must not be null")
      this.stream = inputStream
      this
    }

    def inputStream: InputStream = {
      stream
    }

    def hasInputStream: Boolean = {
      stream != null
    }

    override def toString: String = {
      keyVal + "=" + valueVal
    }
  }

}


text:
/*
 *  Luokassa luodaan ja näytetään ohjelman ikkuna.
 */

import javax.swing.*;

public class GameOfLife {

  /*
   *  Luokan main-metodi, joka käynnistää ohjelman.
   */

  public static void main(String[] args) {
    JFrame ohjelmaIkkuna = new OhjelmaIkkuna();
    ohjelmaIkkuna.show();

    // Asetetaan ikkunan tyyliksi käyttöjärjestelmästä
    // riippumaton ulkoasu.

    String laf = UIManager.getCrossPlatformLookAndFeelClassName();

    try {
      UIManager.setLookAndFeel(laf);
      SwingUtilities.updateComponentTreeUI(ohjelmaIkkuna);
    }
    catch(Exception e) { System.out.println("Exception: " + e); }
  }

}


text:
We are always told that a bullet once shot shall hit the target, anyhow.
Well...<br/>
Here we pull it!

Introducing...
PullBullet
----------

Communication between activities, fragments and services in android has always been a very tedious task. PullBullet makes it awesomely simple. All you need is a gun !
Gun
---

A gun in pullbullet can shoot bullets and can also pull them. Every bullet has a unique serial number and also carries a tailtag which could further carry messages.

Every bullet also has a target. But while a bullet is heading towards its target, we can pull it for a while! Wondering how? You'll need a magnet !

A magnet pulls a bullet between its path. But when a magnet has done its work, it has to release the bullet. So that the bullet continues on its path again.

Following code will demonstrate this concept.

```java
//In your activity
Gun.shoot(911,new TailTag().put("mykey", "This is a 911 emergency. Back off, right now."));
//911 is the serial number of your bullet.
//Or you could also use
Bullet bullet = new Bullet(911, new TailTag().put("mykey", "Another 911 emergency."));
Gun.shoot(bullet);

//And plant a magnet in your service before the above shot to pull the bullet.

Gun.pull(911, new Magnet(){

    @Override
	public void onStuck(Bullet bullet){
	String message = bullet.getTailTag().get("mykey").toString();
	Toast.makeText(this, message, Toast.LENGTH_LONG).show();
    }
}
```
Amazing! Isn't it?

Well, a gun also has another interesting features, which you could check out at the [wiki][1] section!

Gun shoots and pulls everywhere within your app. No matter whether it's an activity, fragment, thread or a service, the gun will have it's shot. But...

A Gun fails to shoot bullets between two processes!
So what then? Well, we also have a rifle !!!
Rifle
-----
A rifle is much similar to the gun. Except that it can also shoot between processes, unlike gun. This means, a rifle shoots everywhere!

Rifle uses intents and broadcasts, so it needs a context.
Unlike gun, a rifle is not static. You have to make a new rifle instance for every component of your app. Like a rifle for an activity and another rifle for a service.

```java
//In your activity
Rifle rifle = new Rifle(getApplicationContext());
rifle.shoot(999, new TailTag().put("mykey", "Hi from rifle."));
//Or simply
Bullet bullet = new Bullet(999,new TailTag().put("mykey", "Hey from rifle!"));
rifle.shoot(bullet);

//And in a service running under process :rifle

Rifle rifle = new Rifle(getApplicationContext());
rifle.pull(999, new Magnet(){

    @Override
	public void onStuck(Bullet bullet){
	String message = bullet.getTailTag().get("mykey").toString();
	Toast.makeText(this,message,Toast.LENGTH_LONG).show();
    }
}
```
Fascinating, isn't it?
Well, a rifle can do much more than this.
It has 66 power bullets. A power bullet is a bullet with power. You cannot shoot it on your own. A rifle shoots it automatically just for you! For example.

```java
rifle.pull(Bullet.SMS_IN, new Magnet(){

	//Bullet.SMS_IN has a serial of -5. All power bullets have negative serials.

    @Override
	public void onStuck(Bullet bullet){
	String number = bullet.getTailTag().get("number").toString();
	String name = bullet.getTailTag().get("name").toString();
	String message = bullet.getTailTag().get("message").toString();
	String toast = "Got a message "+message+" from "+name+" ("+number+")";
	Toast.makeText(this,toast,Toast.LENGTH_LONG).show();
    }
}
```
For more info about power bullets, head over to the [wiki][1] section.

There is one more type of bullet called as bullet di infinity. Remember, a magnet always releases a bullet when it has done its work?

When all the magnets have released a bullet and there are no more magnets left on its path, a bullet hits its target ! In case it was fired from a gun, it bounces back with a serial of -1. This is an only power bullet of the gun. Again, if there are magnets listening for serial -1 on the return path, the bullet takes a rest at each magnet and finally it comes back to the gun! But in case of a rifle, the bullet won't bounce back. It is destroyed the moment it hits the target.

But what does this all have to do with bullet di infinity? You might be wondering. And you are right! It has no target!! It travels infinity!!!

Bullet di infinity
-----------------
As this bullet has no target, it can be pulled anytime!

```java
Gun.shootInfinity(111, new TailTag().put("mykey","message di infinty."));

//And pull it anywhere, anytime!
Bullet bullet = Gun.pull(111, null);
String message = bullet.getTailTag().get("mykey").toString();
//the message of infinity!!!
```
What to choose? Gun or Rifle?
----
It is noticed that (from the 1000 bullets I have shot) Gun shoots a bit faster than rifle. Also Gun is more secure than rifle. So if you have only one process and just communication is all you need, Gun is always preferred over rifle. But, if you want power, well then a rifle has no choice.

For a detailed documentation of `PullBullet` refer [wiki][1].
Download
---
A jar file is attached with every release of `PullBullet`.

License
=======

	Copyright (C) 2015 Vallabh Shevate

    Licensed 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.
[1]: https://github.com/micronic/pullbullet/wiki


text:
#pragma once
#include <aws/rds/RDS_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/rds/model/ProcessorFeature.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace RDS
{
namespace Model
{

  /**
   *
Contains the details of an Amazon RDS DB snapshot.

This data type is
   * used as a response element in the DescribeDBSnapshots action.
   *

See Also:
   AWS API
   * Reference

   */
  class AWS_RDS_API DBSnapshot
  {
  public:
    DBSnapshot();
    DBSnapshot(const Aws::Utils::Xml::XmlNode& xmlNode);
    DBSnapshot& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
    void OutputToStream(Aws::OStream& oStream, const char* location) const;

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline const Aws::String& GetDBSnapshotIdentifier() const{ return m_dBSnapshotIdentifier; }

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline void SetDBSnapshotIdentifier(const Aws::String& value) { m_dBSnapshotIdentifierHasBeenSet = true; m_dBSnapshotIdentifier = value; }

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline void SetDBSnapshotIdentifier(Aws::String&& value) { m_dBSnapshotIdentifierHasBeenSet = true; m_dBSnapshotIdentifier = std::move(value); }

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline void SetDBSnapshotIdentifier(const char* value) { m_dBSnapshotIdentifierHasBeenSet = true; m_dBSnapshotIdentifier.assign(value); }

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotIdentifier(const Aws::String& value) { SetDBSnapshotIdentifier(value); return *this;}

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotIdentifier(Aws::String&& value) { SetDBSnapshotIdentifier(std::move(value)); return *this;}

    /**
     *
Specifies the identifier for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotIdentifier(const char* value) { SetDBSnapshotIdentifier(value); return *this;}

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline const Aws::String& GetDBInstanceIdentifier() const{ return m_dBInstanceIdentifier; }

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline void SetDBInstanceIdentifier(const Aws::String& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = value; }

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline void SetDBInstanceIdentifier(Aws::String&& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = std::move(value); }

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline void SetDBInstanceIdentifier(const char* value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier.assign(value); }

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline DBSnapshot& WithDBInstanceIdentifier(const Aws::String& value) { SetDBInstanceIdentifier(value); return *this;}

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline DBSnapshot& WithDBInstanceIdentifier(Aws::String&& value) { SetDBInstanceIdentifier(std::move(value)); return *this;}

    /**
     *
Specifies the DB instance identifier of the DB instance this DB snapshot was
     * created from.

     */
    inline DBSnapshot& WithDBInstanceIdentifier(const char* value) { SetDBInstanceIdentifier(value); return *this;}

    /**
     *
Provides the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline const Aws::Utils::DateTime& GetSnapshotCreateTime() const{ return m_snapshotCreateTime; }

    /**
     *
Provides the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline void SetSnapshotCreateTime(const Aws::Utils::DateTime& value) { m_snapshotCreateTimeHasBeenSet = true; m_snapshotCreateTime = value; }

    /**
     *
Provides the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline void SetSnapshotCreateTime(Aws::Utils::DateTime&& value) { m_snapshotCreateTimeHasBeenSet = true; m_snapshotCreateTime = std::move(value); }

    /**
     *
Provides the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline DBSnapshot& WithSnapshotCreateTime(const Aws::Utils::DateTime& value) { SetSnapshotCreateTime(value); return *this;}

    /**
     *
Provides the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline DBSnapshot& WithSnapshotCreateTime(Aws::Utils::DateTime&& value) { SetSnapshotCreateTime(std::move(value)); return *this;}

    /**
     *
Specifies the name of the database engine.

     */
    inline const Aws::String& GetEngine() const{ return m_engine; }

    /**
     *
Specifies the name of the database engine.

     */
    inline void SetEngine(const Aws::String& value) { m_engineHasBeenSet = true; m_engine = value; }

    /**
     *
Specifies the name of the database engine.

     */
    inline void SetEngine(Aws::String&& value) { m_engineHasBeenSet = true; m_engine = std::move(value); }

    /**
     *
Specifies the name of the database engine.

     */
    inline void SetEngine(const char* value) { m_engineHasBeenSet = true; m_engine.assign(value); }

    /**
     *
Specifies the name of the database engine.

     */
    inline DBSnapshot& WithEngine(const Aws::String& value) { SetEngine(value); return *this;}

    /**
     *
Specifies the name of the database engine.

     */
    inline DBSnapshot& WithEngine(Aws::String&& value) { SetEngine(std::move(value)); return *this;}

    /**
     *
Specifies the name of the database engine.

     */
    inline DBSnapshot& WithEngine(const char* value) { SetEngine(value); return *this;}

    /**
     *
Specifies the allocated storage size in gibibytes (GiB).

     */
    inline int GetAllocatedStorage() const{ return m_allocatedStorage; }

    /**
     *
Specifies the allocated storage size in gibibytes (GiB).

     */
    inline void SetAllocatedStorage(int value) { m_allocatedStorageHasBeenSet = true; m_allocatedStorage = value; }

    /**
     *
Specifies the allocated storage size in gibibytes (GiB).

     */
    inline DBSnapshot& WithAllocatedStorage(int value) { SetAllocatedStorage(value); return *this;}

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline const Aws::String& GetStatus() const{ return m_status; }

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; }

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); }

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline DBSnapshot& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline DBSnapshot& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}

    /**
     *
Specifies the status of this DB snapshot.

     */
    inline DBSnapshot& WithStatus(const char* value) { SetStatus(value); return *this;}

    /**
     *
Specifies the port that the database engine was listening on at the time of
     * the snapshot.

     */
    inline int GetPort() const{ return m_port; }

    /**
     *
Specifies the port that the database engine was listening on at the time of
     * the snapshot.

     */
    inline void SetPort(int value) { m_portHasBeenSet = true; m_port = value; }

    /**
     *
Specifies the port that the database engine was listening on at the time of
     * the snapshot.

     */
    inline DBSnapshot& WithPort(int value) { SetPort(value); return *this;}

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline DBSnapshot& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline DBSnapshot& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}

    /**
     *
Specifies the name of the Availability Zone the DB instance was located in at
     * the time of the DB snapshot.

     */
    inline DBSnapshot& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline const Aws::String& GetVpcId() const{ return m_vpcId; }

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); }

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline DBSnapshot& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline DBSnapshot& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;}

    /**
     *
Provides the VPC ID associated with the DB snapshot.

     */
    inline DBSnapshot& WithVpcId(const char* value) { SetVpcId(value); return *this;}

    /**
     *
Specifies the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline const Aws::Utils::DateTime& GetInstanceCreateTime() const{ return m_instanceCreateTime; }

    /**
     *
Specifies the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline void SetInstanceCreateTime(const Aws::Utils::DateTime& value) { m_instanceCreateTimeHasBeenSet = true; m_instanceCreateTime = value; }

    /**
     *
Specifies the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline void SetInstanceCreateTime(Aws::Utils::DateTime&& value) { m_instanceCreateTimeHasBeenSet = true; m_instanceCreateTime = std::move(value); }

    /**
     *
Specifies the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline DBSnapshot& WithInstanceCreateTime(const Aws::Utils::DateTime& value) { SetInstanceCreateTime(value); return *this;}

    /**
     *
Specifies the time when the snapshot was taken, in Universal Coordinated Time
     * (UTC).

     */
    inline DBSnapshot& WithInstanceCreateTime(Aws::Utils::DateTime&& value) { SetInstanceCreateTime(std::move(value)); return *this;}

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline const Aws::String& GetMasterUsername() const{ return m_masterUsername; }

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline void SetMasterUsername(const Aws::String& value) { m_masterUsernameHasBeenSet = true; m_masterUsername = value; }

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline void SetMasterUsername(Aws::String&& value) { m_masterUsernameHasBeenSet = true; m_masterUsername = std::move(value); }

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline void SetMasterUsername(const char* value) { m_masterUsernameHasBeenSet = true; m_masterUsername.assign(value); }

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline DBSnapshot& WithMasterUsername(const Aws::String& value) { SetMasterUsername(value); return *this;}

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline DBSnapshot& WithMasterUsername(Aws::String&& value) { SetMasterUsername(std::move(value)); return *this;}

    /**
     *
Provides the master username for the DB snapshot.

     */
    inline DBSnapshot& WithMasterUsername(const char* value) { SetMasterUsername(value); return *this;}

    /**
     *
Specifies the version of the database engine.

     */
    inline const Aws::String& GetEngineVersion() const{ return m_engineVersion; }

    /**
     *
Specifies the version of the database engine.

     */
    inline void SetEngineVersion(const Aws::String& value) { m_engineVersionHasBeenSet = true; m_engineVersion = value; }

    /**
     *
Specifies the version of the database engine.

     */
    inline void SetEngineVersion(Aws::String&& value) { m_engineVersionHasBeenSet = true; m_engineVersion = std::move(value); }

    /**
     *
Specifies the version of the database engine.

     */
    inline void SetEngineVersion(const char* value) { m_engineVersionHasBeenSet = true; m_engineVersion.assign(value); }

    /**
     *
Specifies the version of the database engine.

     */
    inline DBSnapshot& WithEngineVersion(const Aws::String& value) { SetEngineVersion(value); return *this;}

    /**
     *
Specifies the version of the database engine.

     */
    inline DBSnapshot& WithEngineVersion(Aws::String&& value) { SetEngineVersion(std::move(value)); return *this;}

    /**
     *
Specifies the version of the database engine.

     */
    inline DBSnapshot& WithEngineVersion(const char* value) { SetEngineVersion(value); return *this;}

    /**
     *
License model information for the restored DB instance.

     */
    inline const Aws::String& GetLicenseModel() const{ return m_licenseModel; }

    /**
     *
License model information for the restored DB instance.

     */
    inline void SetLicenseModel(const Aws::String& value) { m_licenseModelHasBeenSet = true; m_licenseModel = value; }

    /**
     *
License model information for the restored DB instance.

     */
    inline void SetLicenseModel(Aws::String&& value) { m_licenseModelHasBeenSet = true; m_licenseModel = std::move(value); }

    /**
     *
License model information for the restored DB instance.

     */
    inline void SetLicenseModel(const char* value) { m_licenseModelHasBeenSet = true; m_licenseModel.assign(value); }

    /**
     *
License model information for the restored DB instance.

     */
    inline DBSnapshot& WithLicenseModel(const Aws::String& value) { SetLicenseModel(value); return *this;}

    /**
     *
License model information for the restored DB instance.

     */
    inline DBSnapshot& WithLicenseModel(Aws::String&& value) { SetLicenseModel(std::move(value)); return *this;}

    /**
     *
License model information for the restored DB instance.

     */
    inline DBSnapshot& WithLicenseModel(const char* value) { SetLicenseModel(value); return *this;}

    /**
     *
Provides the type of the DB snapshot.

     */
    inline const Aws::String& GetSnapshotType() const{ return m_snapshotType; }

    /**
     *
Provides the type of the DB snapshot.

     */
    inline void SetSnapshotType(const Aws::String& value) { m_snapshotTypeHasBeenSet = true; m_snapshotType = value; }

    /**
     *
Provides the type of the DB snapshot.

     */
    inline void SetSnapshotType(Aws::String&& value) { m_snapshotTypeHasBeenSet = true; m_snapshotType = std::move(value); }

    /**
     *
Provides the type of the DB snapshot.

     */
    inline void SetSnapshotType(const char* value) { m_snapshotTypeHasBeenSet = true; m_snapshotType.assign(value); }

    /**
     *
Provides the type of the DB snapshot.

     */
    inline DBSnapshot& WithSnapshotType(const Aws::String& value) { SetSnapshotType(value); return *this;}

    /**
     *
Provides the type of the DB snapshot.

     */
    inline DBSnapshot& WithSnapshotType(Aws::String&& value) { SetSnapshotType(std::move(value)); return *this;}

    /**
     *
Provides the type of the DB snapshot.

     */
    inline DBSnapshot& WithSnapshotType(const char* value) { SetSnapshotType(value); return *this;}

    /**
     *
Specifies the Provisioned IOPS (I/O operations per second) value of the DB
     * instance at the time of the snapshot.

     */
    inline int GetIops() const{ return m_iops; }

    /**
     *
Specifies the Provisioned IOPS (I/O operations per second) value of the DB
     * instance at the time of the snapshot.

     */
    inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; }

    /**
     *
Specifies the Provisioned IOPS (I/O operations per second) value of the DB
     * instance at the time of the snapshot.

     */
    inline DBSnapshot& WithIops(int value) { SetIops(value); return *this;}

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline const Aws::String& GetOptionGroupName() const{ return m_optionGroupName; }

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline void SetOptionGroupName(const Aws::String& value) { m_optionGroupNameHasBeenSet = true; m_optionGroupName = value; }

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline void SetOptionGroupName(Aws::String&& value) { m_optionGroupNameHasBeenSet = true; m_optionGroupName = std::move(value); }

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline void SetOptionGroupName(const char* value) { m_optionGroupNameHasBeenSet = true; m_optionGroupName.assign(value); }

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline DBSnapshot& WithOptionGroupName(const Aws::String& value) { SetOptionGroupName(value); return *this;}

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline DBSnapshot& WithOptionGroupName(Aws::String&& value) { SetOptionGroupName(std::move(value)); return *this;}

    /**
     *
Provides the option group name for the DB snapshot.

     */
    inline DBSnapshot& WithOptionGroupName(const char* value) { SetOptionGroupName(value); return *this;}

    /**
     *
The percentage of the estimated data that has been transferred.

     */
    inline int GetPercentProgress() const{ return m_percentProgress; }

    /**
     *
The percentage of the estimated data that has been transferred.

     */
    inline void SetPercentProgress(int value) { m_percentProgressHasBeenSet = true; m_percentProgress = value; }

    /**
     *
The percentage of the estimated data that has been transferred.

     */
    inline DBSnapshot& WithPercentProgress(int value) { SetPercentProgress(value); return *this;}

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline const Aws::String& GetSourceRegion() const{ return m_sourceRegion; }

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline void SetSourceRegion(const Aws::String& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = value; }

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline void SetSourceRegion(Aws::String&& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = std::move(value); }

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline void SetSourceRegion(const char* value) { m_sourceRegionHasBeenSet = true; m_sourceRegion.assign(value); }

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline DBSnapshot& WithSourceRegion(const Aws::String& value) { SetSourceRegion(value); return *this;}

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline DBSnapshot& WithSourceRegion(Aws::String&& value) { SetSourceRegion(std::move(value)); return *this;}

    /**
     *
The AWS Region that the DB snapshot was created in or copied from.

     */
    inline DBSnapshot& WithSourceRegion(const char* value) { SetSourceRegion(value); return *this;}

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline const Aws::String& GetSourceDBSnapshotIdentifier() const{ return m_sourceDBSnapshotIdentifier; }

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline void SetSourceDBSnapshotIdentifier(const Aws::String& value) { m_sourceDBSnapshotIdentifierHasBeenSet = true; m_sourceDBSnapshotIdentifier = value; }

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline void SetSourceDBSnapshotIdentifier(Aws::String&& value) { m_sourceDBSnapshotIdentifierHasBeenSet = true; m_sourceDBSnapshotIdentifier = std::move(value); }

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline void SetSourceDBSnapshotIdentifier(const char* value) { m_sourceDBSnapshotIdentifierHasBeenSet = true; m_sourceDBSnapshotIdentifier.assign(value); }

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline DBSnapshot& WithSourceDBSnapshotIdentifier(const Aws::String& value) { SetSourceDBSnapshotIdentifier(value); return *this;}

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline DBSnapshot& WithSourceDBSnapshotIdentifier(Aws::String&& value) { SetSourceDBSnapshotIdentifier(std::move(value)); return *this;}

    /**
     *
The DB snapshot Amazon Resource Name (ARN) that the DB snapshot was copied
     * from. It only has value in case of cross-customer or cross-region copy.

     */
    inline DBSnapshot& WithSourceDBSnapshotIdentifier(const char* value) { SetSourceDBSnapshotIdentifier(value); return *this;}

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline const Aws::String& GetStorageType() const{ return m_storageType; }

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline void SetStorageType(const Aws::String& value) { m_storageTypeHasBeenSet = true; m_storageType = value; }

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline void SetStorageType(Aws::String&& value) { m_storageTypeHasBeenSet = true; m_storageType = std::move(value); }

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline void SetStorageType(const char* value) { m_storageTypeHasBeenSet = true; m_storageType.assign(value); }

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline DBSnapshot& WithStorageType(const Aws::String& value) { SetStorageType(value); return *this;}

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline DBSnapshot& WithStorageType(Aws::String&& value) { SetStorageType(std::move(value)); return *this;}

    /**
     *
Specifies the storage type associated with DB snapshot.

     */
    inline DBSnapshot& WithStorageType(const char* value) { SetStorageType(value); return *this;}

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline const Aws::String& GetTdeCredentialArn() const{ return m_tdeCredentialArn; }

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline void SetTdeCredentialArn(const Aws::String& value) { m_tdeCredentialArnHasBeenSet = true; m_tdeCredentialArn = value; }

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline void SetTdeCredentialArn(Aws::String&& value) { m_tdeCredentialArnHasBeenSet = true; m_tdeCredentialArn = std::move(value); }

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline void SetTdeCredentialArn(const char* value) { m_tdeCredentialArnHasBeenSet = true; m_tdeCredentialArn.assign(value); }

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline DBSnapshot& WithTdeCredentialArn(const Aws::String& value) { SetTdeCredentialArn(value); return *this;}

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline DBSnapshot& WithTdeCredentialArn(Aws::String&& value) { SetTdeCredentialArn(std::move(value)); return *this;}

    /**
     *
The ARN from the key store with which to associate the instance for TDE
     * encryption.

     */
    inline DBSnapshot& WithTdeCredentialArn(const char* value) { SetTdeCredentialArn(value); return *this;}

    /**
     *
Specifies whether the DB snapshot is encrypted.

     */
    inline bool GetEncrypted() const{ return m_encrypted; }

    /**
     *
Specifies whether the DB snapshot is encrypted.

     */
    inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; }

    /**
     *
Specifies whether the DB snapshot is encrypted.

     */
    inline DBSnapshot& WithEncrypted(bool value) { SetEncrypted(value); return *this;}

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline DBSnapshot& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline DBSnapshot& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}

    /**
     *
 If Encrypted is true, the AWS KMS key identifier for the
     * encrypted DB snapshot.

     */
    inline DBSnapshot& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline const Aws::String& GetDBSnapshotArn() const{ return m_dBSnapshotArn; }

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline void SetDBSnapshotArn(const Aws::String& value) { m_dBSnapshotArnHasBeenSet = true; m_dBSnapshotArn = value; }

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline void SetDBSnapshotArn(Aws::String&& value) { m_dBSnapshotArnHasBeenSet = true; m_dBSnapshotArn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline void SetDBSnapshotArn(const char* value) { m_dBSnapshotArnHasBeenSet = true; m_dBSnapshotArn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotArn(const Aws::String& value) { SetDBSnapshotArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotArn(Aws::String&& value) { SetDBSnapshotArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) for the DB snapshot.

     */
    inline DBSnapshot& WithDBSnapshotArn(const char* value) { SetDBSnapshotArn(value); return *this;}

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline const Aws::String& GetTimezone() const{ return m_timezone; }

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline void SetTimezone(const Aws::String& value) { m_timezoneHasBeenSet = true; m_timezone = value; }

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline void SetTimezone(Aws::String&& value) { m_timezoneHasBeenSet = true; m_timezone = std::move(value); }

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline void SetTimezone(const char* value) { m_timezoneHasBeenSet = true; m_timezone.assign(value); }

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline DBSnapshot& WithTimezone(const Aws::String& value) { SetTimezone(value); return *this;}

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline DBSnapshot& WithTimezone(Aws::String&& value) { SetTimezone(std::move(value)); return *this;}

    /**
     *
The time zone of the DB snapshot. In most cases, the Timezone
     * element is empty. Timezone content appears only for snapshots taken
     * from Microsoft SQL Server DB instances that were created with a time zone
     * specified.

     */
    inline DBSnapshot& WithTimezone(const char* value) { SetTimezone(value); return *this;}

    /**
     *
True if mapping of AWS Identity and Access Management (IAM) accounts to
     * database accounts is enabled, and otherwise false.

     */
    inline bool GetIAMDatabaseAuthenticationEnabled() const{ return m_iAMDatabaseAuthenticationEnabled; }

    /**
     *
True if mapping of AWS Identity and Access Management (IAM) accounts to
     * database accounts is enabled, and otherwise false.

     */
    inline void SetIAMDatabaseAuthenticationEnabled(bool value) { m_iAMDatabaseAuthenticationEnabledHasBeenSet = true; m_iAMDatabaseAuthenticationEnabled = value; }

    /**
     *
True if mapping of AWS Identity and Access Management (IAM) accounts to
     * database accounts is enabled, and otherwise false.

     */
    inline DBSnapshot& WithIAMDatabaseAuthenticationEnabled(bool value) { SetIAMDatabaseAuthenticationEnabled(value); return *this;}

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline const Aws::Vector<ProcessorFeature>& GetProcessorFeatures() const{ return m_processorFeatures; }

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline void SetProcessorFeatures(const Aws::Vector<ProcessorFeature>& value) { m_processorFeaturesHasBeenSet = true; m_processorFeatures = value; }

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline void SetProcessorFeatures(Aws::Vector<ProcessorFeature>&& value) { m_processorFeaturesHasBeenSet = true; m_processorFeatures = std::move(value); }

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline DBSnapshot& WithProcessorFeatures(const Aws::Vector<ProcessorFeature>& value) { SetProcessorFeatures(value); return *this;}

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline DBSnapshot& WithProcessorFeatures(Aws::Vector<ProcessorFeature>&& value) { SetProcessorFeatures(std::move(value)); return *this;}

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline DBSnapshot& AddProcessorFeatures(const ProcessorFeature& value) { m_processorFeaturesHasBeenSet = true; m_processorFeatures.push_back(value); return *this; }

    /**
     *
The number of CPU cores and the number of threads per core for the DB
     * instance class of the DB instance when the DB snapshot was created.

     */
    inline DBSnapshot& AddProcessorFeatures(ProcessorFeature&& value) { m_processorFeaturesHasBeenSet = true; m_processorFeatures.push_back(std::move(value)); return *this; }

  private:

    Aws::String m_dBSnapshotIdentifier;
    bool m_dBSnapshotIdentifierHasBeenSet;

    Aws::String m_dBInstanceIdentifier;
    bool m_dBInstanceIdentifierHasBeenSet;

    Aws::Utils::DateTime m_snapshotCreateTime;
    bool m_snapshotCreateTimeHasBeenSet;

    Aws::String m_engine;
    bool m_engineHasBeenSet;

    int m_allocatedStorage;
    bool m_allocatedStorageHasBeenSet;

    Aws::String m_status;
    bool m_statusHasBeenSet;

    int m_port;
    bool m_portHasBeenSet;

    Aws::String m_availabilityZone;
    bool m_availabilityZoneHasBeenSet;

    Aws::String m_vpcId;
    bool m_vpcIdHasBeenSet;

    Aws::Utils::DateTime m_instanceCreateTime;
    bool m_instanceCreateTimeHasBeenSet;

    Aws::String m_masterUsername;
    bool m_masterUsernameHasBeenSet;

    Aws::String m_engineVersion;
    bool m_engineVersionHasBeenSet;

    Aws::String m_licenseModel;
    bool m_licenseModelHasBeenSet;

    Aws::String m_snapshotType;
    bool m_snapshotTypeHasBeenSet;

    int m_iops;
    bool m_iopsHasBeenSet;

    Aws::String m_optionGroupName;
    bool m_optionGroupNameHasBeenSet;

    int m_percentProgress;
    bool m_percentProgressHasBeenSet;

    Aws::String m_sourceRegion;
    bool m_sourceRegionHasBeenSet;

    Aws::String m_sourceDBSnapshotIdentifier;
    bool m_sourceDBSnapshotIdentifierHasBeenSet;

    Aws::String m_storageType;
    bool m_storageTypeHasBeenSet;

    Aws::String m_tdeCredentialArn;
    bool m_tdeCredentialArnHasBeenSet;

    bool m_encrypted;
    bool m_encryptedHasBeenSet;

    Aws::String m_kmsKeyId;
    bool m_kmsKeyIdHasBeenSet;

    Aws::String m_dBSnapshotArn;
    bool m_dBSnapshotArnHasBeenSet;

    Aws::String m_timezone;
    bool m_timezoneHasBeenSet;

    bool m_iAMDatabaseAuthenticationEnabled;
    bool m_iAMDatabaseAuthenticationEnabledHasBeenSet;

    Aws::Vector<ProcessorFeature> m_processorFeatures;
    bool m_processorFeaturesHasBeenSet;
  };

} // namespace Model
} // namespace RDS
} // namespace Aws


text:
(function(){
  function SongPlayer($rootScope, Fixtures){
    // @desc Song Player service
    // @type {Object}
    var SongPlayer = {};

    // @desc Use Fixtures service to get the currentAlbum being played or paused
    // @type {Object}
    var currentAlbum = Fixtures.getAlbum();

    // @desc Buzz object audio filter
    // @type {Object}
    var currentBuzzObject = null;

    // @function setSong
    // @desc Stops currently playing song and loads new audio file as currentBuzzObject
    // @param {Object} song
    var setSong = function(song){
      if(currentBuzzObject){
        currentBuzzObject.stop();
        SongPlayer.currentSong.playing = null;
      }

      currentBuzzObject = new buzz.sound(song.audioUrl, {
        formats: ['mp3'],
        preload: true
      });

      currentBuzzObject.bind('timeupdate', function(){
        $rootScope.$apply(function(){
          SongPlayer.currentTime = currentBuzzObject.getTime();
        });
      });

      currentBuzzObject.bind('volumeupdate', function(){
        $rootScope.$apply(function(){
          SongPlayer.volume = currentBuzzObject.getVolume();
        });
      });

      SongPlayer.currentSong = song;
    };

    // @function playSong
    // @desc Plays the currentBuzzObject
    // @param {Object} song
    var playSong = function(song){
      song.playing = true;
      currentBuzzObject.setVolume(SongPlayer.volume);
      currentBuzzObject.play();
    };

    // @function playSong
    // @desc Stops the currentBuzzObject
    // @param {Object} song
    var stopSong = function(song){
      song = song || SongPlayer.currentSong;
      song.playing = null;
      currentBuzzObject.stop();
    };

    // @function getSongIndex
    // @desc Returns the index of the song in the currentAlbum
    // @param {Object} song
    var getSongIndex = function(song){
      return currentAlbum.songs.indexOf(song);
    };

    // @desc Currently playing or paused song
    // @type {Object}
    SongPlayer.currentSong = null;

    // @desc Current playback time (in seconds) of currently playing song
    // @type {Number}
    SongPlayer.currentTime = null;

    SongPlayer.volume = 30;

    // @function SongPlayer.play
    // @desc Sets the current song and plays it
    // @param {Object} song
    SongPlayer.play = function(song){
      song = song || SongPlayer.currentSong;
      if(SongPlayer.currentSong !== song){
        setSong(song);

        playSong(song);

      } else if(SongPlayer.currentSong === song){
        if(currentBuzzObject && currentBuzzObject.isPaused()){
          playSong(song);
        } else {
          setSong(currentAlbum.songs[0]);
          playSong(currentAlbum.songs[0]);
        }
      } else {
        setSong(currentAlbum.songs[0]);
        playSong(currentAlbum.songs[0]);
      }
    };

    // @function SongPlayer.pause
    // @desc Pauses the currently playing song
    // @param {Object} song
    SongPlayer.pause = function(song){
      song = song || SongPlayer.currentSong;
      currentBuzzObject.pause();
      song.playing = false;
    };

    // @function SongPlayer.previous
    // @desc Changes the currentSong to the previous song on the album
    SongPlayer.previous = function(){
      var currentSongIndex = getSongIndex(SongPlayer.currentSong);
      currentSongIndex--;

      if(currentSongIndex < 0){
        stopSong();
      } else{
        var song = currentAlbum.songs[currentSongIndex];
        setSong(song);
        playSong(song);
      }
    };

    // @function SongPlayer.next
    // @desc Changes the currentSong to the next song on the album
    SongPlayer.next = function(){
      var currentSongIndex = getSongIndex(SongPlayer.currentSong);
      currentSongIndex++;

      if(currentSongIndex >= currentAlbum.songs.length){
        stopSong();
      } else {
        var song = currentAlbum.songs[currentSongIndex];
        setSong(song);
        playSong(song);
      }
    };

    // @function setCurrentTime
    // @desc Set current time (in seconds) of currently playing song
    // @param {Number} time
    SongPlayer.setCurrentTime = function(time){
      if(currentBuzzObject){
        currentBuzzObject.setTime(time);
      }
    };

    // @function setVolume
    // @desc Sets the volume on the songPlayer and currentBuzzObject if one exists
    // @param {Number} value
    SongPlayer.setVolume = function(value){
      SongPlayer.volume = value;
      if(currentBuzzObject){
        currentBuzzObject.setVolume(value);
      }
    };

    return SongPlayer;
  };

  angular
    .module('blocJams')
    .factory('SongPlayer', ['$rootScope', 'Fixtures', SongPlayer]);
})();


text:
    Current and Upcoming HvZ Games

Congratulations! You have joined an upcoming Humans vs. Zombies game at Oregon State. Below is your secret ID valid for THIS GAME ONLY! Write this down on a notecard (also listed on profile). You will need to give your game secret to the zombie who tags you. Grab an index card and write down the following information:

      Secret Game ID (front)

      <?php echo $secret ?>

      Your Name (back)

      <?php echo $_SESSION['name'] ?>

  TWO IMPORTANT THINGS:

OZ POOL: We randomly select the original zombies from this pool. You may opt-into the original zombie pool <a class="accent_color" href="http://<?php echo DOMAIN; ?>/joingame/ozoptin/<?php echo $game['gid'];?>">by clicking here. What is an original zombie? They are players who start the game as zombie, and on the first day of the game, they get to disguise themselves as humans! Original zombies take great pleasure infecting as many players as possible on day one.

ORIENTATIONS: we have orientation meetings setup. You must attend at least one orientation session! If you do not attend at least one orientation, you will be deceased at the beginning of the game. These will aquaint you with rules, gameplay and get you geared up for the game. <a class="accent_color" href="http://<?php echo DOMAIN; ?>/orientations/<?php echo $joined_game['gid'] ?>">Click here to view a list of the orientation sessions for the <?php echo $joined_game['name'] ?> game.

You are now ready to play! Grab your Nerf Blaster and your socks and get ready to take on the zombie horde! We will have email announcments closer to game time so stay tuned.


text:
<?php
/**
 * @package ThemeGrill
 * @subpackage Radiate
 * @since Radiate 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?>

		<?php if ( 'post' == get_post_type() ) : ?>

			<?php radiate_posted_on(); ?>

		<?php endif; ?>

  <?php
   if( has_post_thumbnail() ) {
      $image = '';
      $title_attribute = the_title_attribute( 'echo=0' );
      $image .= '
';
      $image .= '';
      $image .= get_the_post_thumbnail( $post->ID, 'featured-image-medium', array( 'title' => $title_attribute, 'alt' => $title_attribute ) ).'';
      $image .= '
';

      echo $image;
   }
   ?>

		<?php the_excerpt(); ?>

	<?php if ( is_search() ) : // Only display Excerpts for Search ?>

	<?php else : ?>

	<?php endif; ?>

		<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
			<?php
				/* translators: used between list items, there is a space after the comma */
				$categories_list = get_the_category_list( __( ', ', 'radiate' ) );
				if ( $categories_list && radiate_categorized_blog() ) :
			?>

				<?php echo $categories_list; ?>

			<?php endif; // End if categories ?>

			<?php
				/* translators: used between list items, there is a space after the comma */
				$tags_list = get_the_tag_list( '', __( ', ', 'radiate' ) );
				if ( $tags_list ) :
			?>

				<?php echo $tags_list; ?>

			<?php endif; // End if $tags_list ?>
		<?php endif; // End if 'post' == get_post_type() ?>

		<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
		<?php comments_popup_link( __( 'Leave a comment', 'radiate' ), __( '1 Comment', 'radiate' ), __( '% Comments', 'radiate' ) ); ?>
		<?php endif; ?>

		<?php edit_post_link( __( 'Edit', 'radiate' ), '', '' ); ?>


text:
ALTER TABLE hydra_client DROP CONSTRAINT "primary";
ALTER TABLE hydra_client ADD CONSTRAINT "hydra_client_pkey" PRIMARY KEY (pk);


text:
class AddStatesToProposals < ActiveRecord::Migration
  def self.up
    change_table :proposals do |t|
      t.text :state
    end
  end

  def self.down
    remove_column :proposals, :state
  end
end


text:
define([
	'jquery',
	'underscore',
	'backbone',
	'marionette',
	'text!templates/tools/nav-list/tools-nav-list.tpl'
], function($, _, Backbone, Marionette, Template) {
	return Backbone.Marionette.ItemView.extend({

		//
		// rendering methods
		//

		template: function(data) {
			return _.template(Template, _.extend(data, {
				user: this.model,
				collection: this.collection
			}));
		},

		onRender: function() {

			// update sidebar navigation highlighting
			//
			if (this.options.nav) {
				this.$el.find('.nav li').removeClass('active');
				this.$el.find('.nav li.' + this.options.nav).addClass('active');
			}
		}
	});
});


text:
require 'spec_helper'
require 'timecop'

describe Chronosphere::CLI do
  include_context "spec"

  before do
    Timecop.freeze(Time.local(2012))
  end

  after do
    Timecop.return
  end

  describe "since" do
    it "returns error string if you give a date in the future" do
      expect{@cli.since('next year')}.to raise_error(SystemExit)
      expect($stdout.string).to eq "You've asked for days since a date in the future!\nUse `chronosphere until 'next year' instead`\n"
    end

    it "returns the amount of days until a date" do
      @cli.since('a year ago')
      expect($stdout.string).to eq "It's been 365 days since a year ago\n"
    end
  end
end


text:
import { initCookies, getCookie } from "./cookies";
import { addStaffButtons, getStaff, getStaffMenuHTML, openStaffLightBox } from "./manage";
import { prepareThumbnails, preparePostPreviews } from "./postutil";
import { initSettings } from "./settings";
import { initTopBar, TopBarButton, DropDownMenu } from "./topbar";
import { initQR } from "./qr";
import { opRegex } from "./vars";

let currentStaff = null;
let $watchedThreadsBtn = null;
let $staffBtn = null;

export function toTop() {
	window.scrollTo(0,0);
}
window.toTop = toTop;

export function toBottom() {
	window.scrollTo(0,document.body.scrollHeight);
}
window.toBottom = toBottom;

export function changePage(sel) {
	let info = getPageThread();
	if(info.board == "" || info.op == -1) return;
	if(sel.value != "")
		window.location = webroot + info.board + "/res/" + info.op + "p" + sel.value + ".html";
}

function getBoard() {
	let rootIndex = window.location.pathname.indexOf(webroot);
	let board = window.location.pathname.substring(rootIndex+webroot.length);
	if(board.length > 0 && board.indexOf("/") > -1) {
		board = board.split("/")[0];
	} else {
		board = "";
	}
	return board;
}

export function getPageThread() {
	let arr = opRegex.exec(window.location.pathname);
	let info = {
		board: getBoard(),
		boardID: -1,
		op: -1,
		page: 0
	};
	if(arr == null) return info;
	if(arr.length > 1) info.op = arr[1];
	if(arr.length > 3) info.page = arr[3];
	if(arr.board != "") info.boardID = $("form#postform input[name=boardid]").val() -1;
	return info;
}

function handleKeydown(e) {
	let tag = "";
	if(!e.ctrlKey || e.target.nodeName != "TEXTAREA") return;
	switch(e.keyCode) {
		case 10: // Enter key
		case 13: // Enter key in Chrome/IE
			document.getElementById("postform").submit();
		break;
		case 66: // B
			tag = "b"; // bold
		break;
		case 73: // I
			tag = "i"; // italics
		break;
		case 82: // R
			tag = "s"; // strikethrough
		break;
		case 83:
			tag = "?"; // spoiler (not yet implemented)
		break;
		case 85: // U
			tag = "u"; // underline
		break;
	}
	if(tag == "") return;

	e.preventDefault();
	let ta = e.target;
	let val = ta.value;
	let ss = ta.selectionStart;
	let se = ta.selectionEnd;
	let r = se + 2 + tag.length;
	ta.value = val.slice(0, ss) + ("[" + tag + "]") + val.slice(ss, se) + ("[/" + tag + "]") + val.slice(se);
	ta.setSelectionRange(r, r);
}

$(() => {
	let pageThread = getPageThread();
	let style = getCookie("style", defaultStyle);
	let themeElem = document.getElementById("theme");
	if(themeElem) themeElem.setAttribute("href", `${webroot}css/${style}`);
	currentStaff = getStaff();
	initCookies();
	initTopBar();
	initSettings();

	$watchedThreadsBtn = new TopBarButton("WT", () => {});

	if(currentStaff.rank > 0) {
		$staffBtn = new TopBarButton("Staff", () => {
			window.location = "/manage?action=dashboard"
		})
		/* $staffBtn = new DropDownMenu("Staff",getStaffMenuHTML())
		$("a#staff.dropdown-button").click(function() {
			$("a.staffmenu-item").click(function() {
				let url = $(this).attr("id");
				openStaffLightBox(url);
	 		});
		}); */
		// addStaffButtons();
	}

	if(pageThread.board != "") {
		prepareThumbnails();
		if(getCookie("useqr") == "true") initQR(pageThread);
	}

	preparePostPreviews(false);
	$(".plus").click(function() {
		let block = $(this).parent().next();
		if(block.css("display") == "none") {
			block.show();
			$(this).html("-");
		} else {
			block.hide();
			$(this).html("+");
		}
	});
	let threadMenuOpen = false;
	$(".thread-ddown a, body").click(function(e) {
		e.stopPropagation();
		let postID = $(this).parent().parent().parent().attr("id");
		let isOP = $(this).parent().parent().parent().attr("class") == "thread";

		if(postID == undefined) return;
		if($(this).parent().find("div.thread-ddown-menu").length == 0) {
			$("div.thread-ddown-menu").remove();

			let menuHTML = `<div class="thread-ddown-menu" id="${postID}">`;
			if(!isOP) menuHTML += `<ul><li><a href="javascript:hidePost(${postID});" class="hide-post">Show/Hide post</a></li>`;
			menuHTML +=
				`<li><a href="javascript:deletePost(${postID});" class="delete-post">Delete post</a></li>` +
				`<li><a href="javascript:reportPost(${postID});" class="report-post">Report Post</a></li></ul></div>`

			$(this).parent().append(menuHTML);
			threadMenuOpen = true;
		} else {
			$("div.thread-ddown-menu").remove();
			threadMenuOpen = false;
		}
	});
	$(document).keydown(handleKeydown);
});


text:
package net.omniscimus.universalvotes.listeners;

import java.util.List;
import java.sql.SQLException;
import java.util.logging.Level;

import net.omniscimus.universalvotes.UniversalVotes;
import net.omniscimus.universalvotes.VotesSQL;

import org.bukkit.command.CommandSender;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

import com.vexsoftware.votifier.model.Vote;
import com.vexsoftware.votifier.model.VotifierEvent;

/**
 * This class gets notified when people vote.
 */
public class VoteListener implements Listener {

    private final UniversalVotes plugin;
    private final VotesSQL database;
    private final List<String> commandsOnVote;

    /**
     * Creates the object.
     *
     * @param plugin UniversalVotes instance
     * @param database a MySQL accessor
     */
    public VoteListener(UniversalVotes plugin, VotesSQL database) {
	this.plugin = plugin;
	this.database = database;
	commandsOnVote = plugin.getConfig().getStringList("votifier.commands_on_vote");
    }

    @EventHandler
    @SuppressWarnings("deprecation")
    public void onVotifierEvent(VotifierEvent event) {
	Vote vote = event.getVote();
	String playerName = vote.getUsername();

	for (String command : commandsOnVote) {
	    plugin.getServer().dispatchCommand(plugin.getServer().getConsoleSender(), command.replace("%p", playerName));
	}

	try {
	    database.addVote(playerName);
	} catch (SQLException | ClassNotFoundException e) {
	    plugin.getLogger().log(Level.SEVERE, "Couldn't add a vote to player " + playerName + "!", e);
	}

    }

    /**
     * Sends a fake votifier event to the server.
     *
     * @param plugin UniversalVotes instance
     * @param sender the person who is sending this vote
     */
    public static void fakeVote(UniversalVotes plugin, CommandSender sender) {
	Vote vote = new Vote(
		"ServerList",
		sender.getName(),
		"1337.0.0.1",
		String.valueOf(System.currentTimeMillis()));
	plugin.getServer().getPluginManager().callEvent(new VotifierEvent(vote));
    }

}