package org.owasp.webgoat.plugin.db_cross_site;

import org.owasp.webgoat.plugin.GoatHillsFinancial.DefaultLessonAction;
import org.owasp.webgoat.plugin.GoatHillsFinancial.Employee;
import org.owasp.webgoat.plugin.GoatHillsFinancial.GoatHillsFinancial;
import org.owasp.webgoat.plugin.GoatHillsFinancial.LessonAction;
import org.owasp.webgoat.session.ParameterNotFoundException;
import org.owasp.webgoat.session.UnauthenticatedException;
import org.owasp.webgoat.session.UnauthorizedException;
import org.owasp.webgoat.session.ValidationException;
import org.owasp.webgoat.session.WebSession;

import javax.servlet.http.HttpServletRequest;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class UpdateProfileDBCrossSiteScripting extends DefaultLessonAction
{

    private LessonAction chainedAction;

    public UpdateProfileDBCrossSiteScripting(GoatHillsFinancial lesson, String lessonName, String actionName, LessonAction chainedAction)
    {
        super(lesson, lessonName, actionName);
        this.chainedAction = chainedAction;
    }

    public void handleRequest(WebSession s) throws ParameterNotFoundException, UnauthenticatedException,
            UnauthorizedException, ValidationException
    {
        if (isAuthenticated(s))
        {
            int userId = getIntSessionAttribute(s, getLessonName() + "." + GoatHillsFinancial.USER_ID);

            HttpServletRequest request = s.getRequest();
            int subjectId = Integer.parseInt(request.getParameter(DBCrossSiteScripting.EMPLOYEE_ID));
            String firstName = request.getParameter(DBCrossSiteScripting.FIRST_NAME);
            String lastName = request.getParameter(DBCrossSiteScripting.LAST_NAME);
            String ssn = request.getParameter(DBCrossSiteScripting.SSN);
            String title = request.getParameter(DBCrossSiteScripting.TITLE);
            String phone = request.getParameter(DBCrossSiteScripting.PHONE_NUMBER);
            String address1 = request.getParameter(DBCrossSiteScripting.ADDRESS1);
            String address2 = request.getParameter(DBCrossSiteScripting.ADDRESS2);
            int manager = Integer.parseInt(request.getParameter(DBCrossSiteScripting.MANAGER));
            String startDate = request.getParameter(DBCrossSiteScripting.START_DATE);
            int salary = Integer.parseInt(request.getParameter(DBCrossSiteScripting.SALARY));
            String ccn = request.getParameter(DBCrossSiteScripting.CCN);
            int ccnLimit = Integer.parseInt(request.getParameter(DBCrossSiteScripting.CCN_LIMIT));
            String disciplinaryActionDate = request.getParameter(DBCrossSiteScripting.DISCIPLINARY_DATE);
            String disciplinaryActionNotes = request.getParameter(DBCrossSiteScripting.DISCIPLINARY_NOTES);
            String personalDescription = request.getParameter(DBCrossSiteScripting.DESCRIPTION);

            Employee employee = new Employee(subjectId, firstName, lastName, ssn, title, phone, address1, address2,
                    manager, startDate, salary, ccn, ccnLimit, disciplinaryActionDate, disciplinaryActionNotes,
                    personalDescription);

            try
            {
                if (subjectId > 0)
                {
                    this.changeEmployeeProfile(s, userId, subjectId, employee);
                    setRequestAttribute(s, getLessonName() + "." + DBCrossSiteScripting.EMPLOYEE_ID, Integer
                            .toString(subjectId));
                    if (DBCrossSiteScripting.STAGE1.equals(getStage(s)))
                    {
                        address1 = address1.toLowerCase();
                        boolean pass = address1.contains("<script>");
                        pass &= address1.contains("alert");
                        pass &= address1.contains("</script>");
                        if (pass)
                        {
                            setStageComplete(s, DBCrossSiteScripting.STAGE1);
                        }
                    }
                }
                else
                    this.createEmployeeProfile(s, userId, employee);
            } catch (SQLException e)
            {
                s.setMessage("Error updating employee profile");
                e.printStackTrace();
                if (DBCrossSiteScripting.STAGE2.equals(getStage(s))
                        && (e.getMessage().contains("ORA-06512") || e.getMessage().contains("Illegal characters"))
                        && !employee.getAddress1().matches("^[a-zA-Z0-9,\\. ]{0,80}$"))
                {
                    setStageComplete(s, DBCrossSiteScripting.STAGE2);
                }

            }

            try
            {
                chainedAction.handleRequest(s);
            } catch (UnauthenticatedException ue1)
            {
                // System.out.println("Internal server error");
                ue1.printStackTrace();
            } catch (UnauthorizedException ue2)
            {
                // System.out.println("Internal server error");
                ue2.printStackTrace();
            }
        }
        else
            throw new UnauthenticatedException();
    }

    public String getNextPage(WebSession s)
    {
        return DBCrossSiteScripting.VIEWPROFILE_ACTION;
    }

    public void changeEmployeeProfile(WebSession s, int userId, int subjectId, Employee employee) throws SQLException
        {
            String update = " { CALL UPDATE_EMPLOYEE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) }";
            CallableStatement call = WebSession.getConnection(s).prepareCall(update);
            // Note: The password field is ONLY set by ChangePassword
            call.setInt(1, userId);
            call.setString(2, employee.getFirstName());
            call.setString(3, employee.getLastName());
            call.setString(4, employee.getSsn());
            call.setString(5, employee.getTitle());
            call.setString(6, employee.getPhoneNumber());
            call.setString(7, employee.getAddress1());
            call.setString(8, employee.getAddress2());
            call.setInt(9, employee.getManager());
            call.setString(10, employee.getStartDate());
            call.setInt(11, employee.getSalary());
            call.setString(12, employee.getCcn());
            call.setInt(13, employee.getCcnLimit());
            call.setString(14, employee.getDisciplinaryActionDate());
            call.setString(15, employee.getDisciplinaryActionNotes());
            call.setString(16, employee.getPersonalDescription());
            call.executeUpdate();
    }

    public void createEmployeeProfile(WebSession s, int userId, Employee employee) throws UnauthorizedException
    {
        try
        {
            int nextId = getNextUID(s);
            String query = "INSERT INTO employee VALUES ( " + nextId + ", ?,?,?,?,?,?,?,?,?,?,?,?,?,?)";

            try
            {
                PreparedStatement ps = WebSession.getConnection(s).prepareStatement(query);

                ps.setString(1, employee.getFirstName().toLowerCase());
                ps.setString(2, employee.getLastName());
                ps.setString(3, employee.getSsn());
                ps.setString(4, employee.getTitle());
                ps.setString(5, employee.getPhoneNumber());
                ps.setString(6, employee.getAddress1());
                ps.setString(7, employee.getAddress2());
                ps.setInt(8, employee.getManager());
                ps.setString(9, employee.getStartDate());
                ps.setString(10, employee.getCcn());
                ps.setInt(11, employee.getCcnLimit());
                ps.setString(12, employee.getDisciplinaryActionDate());
                ps.setString(13, employee.getDisciplinaryActionNotes());
                ps.setString(14, employee.getPersonalDescription());

                ps.execute();
            } catch (SQLException sqle)
            {
                s.setMessage("Error updating employee profile");
                sqle.printStackTrace();
            }
        } catch (Exception e)
        {
            s.setMessage("Error updating employee profile");
            e.printStackTrace();
        }
    }

    private int getNextUID(WebSession s)
    {
        int uid = -1;
        try
        {
            Statement statement = WebSession.getConnection(s).createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                                                                ResultSet.CONCUR_READ_ONLY);
            ResultSet results = statement.executeQuery("select max(userid) as uid from employee");
            results.first();
            uid = results.getInt("uid");
        } catch (SQLException sqle)
        {
            sqle.printStackTrace();
            s.setMessage("Error updating employee profile");
        }
        return uid + 1;
    }
}


<?php

namespace app\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\Clientes;

/**
 * ClientesSearch represents the model behind the search form about `app\models\Clientes`.
 */
class ClientesSearch extends Clientes
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['idClientes', 'prioridad', 'telefono'], 'integer'],
            [['ci_cliente', 'nombre', 'horario_atencion', 'email'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Clientes::find();

        // add conditions that should always apply here

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        // grid filtering conditions
        $query->andFilterWhere([
            'idClientes' => $this->idClientes,
            'prioridad' => $this->prioridad,
            'telefono' => $this->telefono,
        ]);

        $query->andFilterWhere(['like', 'ci_cliente', $this->ci_cliente])
            ->andFilterWhere(['like', 'nombre', $this->nombre])
            ->andFilterWhere(['like', 'horario_atencion', $this->horario_atencion])
            ->andFilterWhere(['like', 'email', $this->email]);

        return $dataProvider;
    }
}


package pivkey

import (
	"github.com/go-piv/piv-go/piv"
)

func SlotForName(slotName string) *piv.Slot {
	switch slotName {
	case "":
		return &piv.SlotSignature
	case "authentication":
		return &piv.SlotAuthentication
	case "signature":
		return &piv.SlotSignature
	case "card-authentication":
		return &piv.SlotCardAuthentication
	case "key-management":
		return &piv.SlotKeyManagement
	default:
		return nil
	}
}

func PINPolicyForName(policyName string, slot piv.Slot) piv.PINPolicy {
	switch policyName {
	case "":
		return defaultPINPolicyForSlot(slot)
	case "never":
		return piv.PINPolicyNever
	case "once":
		return piv.PINPolicyOnce
	case "always":
		return piv.PINPolicyAlways
	default:
		return -1
	}
}

func TouchPolicyForName(policyName string, slot piv.Slot) piv.TouchPolicy {
	switch policyName {
	case "":
		return defaultTouchPolicyForSlot(slot)
	case "never":
		return piv.TouchPolicyNever
	case "cached":
		return piv.TouchPolicyCached
	case "always":
		return piv.TouchPolicyAlways
	default:
		return -1
	}
}

func defaultPINPolicyForSlot(slot piv.Slot) piv.PINPolicy {
	//
	// Defaults from https://developers.yubico.com/PIV/Introduction/Certificate_slots.html
	//

	switch slot {
	case piv.SlotAuthentication:
		return piv.PINPolicyOnce
	case piv.SlotSignature:
		return piv.PINPolicyAlways
	case piv.SlotKeyManagement:
		return piv.PINPolicyOnce
	case piv.SlotCardAuthentication:
		return piv.PINPolicyNever
	default:
		// This should never happen
		panic("invalid value for slot")
	}
}

func defaultTouchPolicyForSlot(slot piv.Slot) piv.TouchPolicy {
	//
	// Defaults from https://developers.yubico.com/PIV/Introduction/Certificate_slots.html
	//

	switch slot {
	case piv.SlotAuthentication:
		return piv.TouchPolicyCached
	case piv.SlotSignature:
		return piv.TouchPolicyAlways
	case piv.SlotKeyManagement:
		return piv.TouchPolicyCached
	case piv.SlotCardAuthentication:
		return piv.TouchPolicyNever
	default:
		// This should never happen
		panic("invalid value for slot")
	}
}


<macros>
    <token name="@TOOL_VERSION@">3.4</token>
    <token name="@GALAXY_TOOL_VERSION@">galaxy1</token>
    <xml name="edam_ontology">
        <edam_topics>
            <edam_topic>topic_0632</edam_topic>
        </edam_topics>
        <edam_operations>
            <edam_operation>operation_0231</edam_operation>
        </edam_operations>
    </xml>
    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@TOOL_VERSION@">cutadapt</requirement>
        </requirements>
    </xml>
    <xml name="citations">
        <citations>
            <citation type="doi">10.14806/ej.17.1.200</citation>
        </citations>
    </xml>
    <xml name="xrefs">
        <xrefs>
            <xref type='bio.tools'>cutadapt</xref>
        </xrefs>
    </xml>
     <token name="@read1_options@"><![CDATA[

        ## Read1 trimming

        #for $a in $library.r1.adapters
            #if $a.adapter_source.adapter_source_list == 'builtin':
                -a '${a.adapter_source.adapter.fields.name}'='${a.adapter_source.adapter}${adapter_options.internal}'
            #else if $a.adapter_source.adapter_source_list == 'file':
                -a file:'${a.adapter_source.adapter_file}${adapter_options.internal}'
            #else if str($a.adapter_source.adapter_name) != "":
                -a '${a.adapter_source.adapter_name}'='${a.adapter_source.adapter}${adapter_options.internal}'
            #else
                -a '${a.adapter_source.adapter}${adapter_options.internal}'
            #end if
        #end for
        #for $aa in $library.r1.anywhere_adapters
            #if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'builtin':
                -b '${aa.anywhere_adapter_source.anywhere_adapter.fields.name}'='${aa.anywhere_adapter_source.anywhere_adapter}'
            #else if $aa.anywhere_adapter_source.anywhere_adapter_source_list == 'file':
                -b file:'${aa.anywhere_adapter_source.anywhere_adapter_file}'
            #else if str($aa.anywhere_adapter_source.anywhere_adapter_name) != "":
                -b '${aa.anywhere_adapter_source.anywhere_adapter_name}'='${aa.anywhere_adapter_source.anywhere_adapter}'
            #else
                -b '${aa.anywhere_adapter_source.anywhere_adapter}'
            #end if
        #end for
        #for $fa in $library.r1.front_adapters
            #if $fa.front_adapter_source.front_adapter_source_list == 'builtin':
                -g '${fa.front_adapter_source.front_adapter.fields.name}'='${adapter_options.internal}${fa.front_adapter_source.front_adapter}'
            #else if $fa.front_adapter_source.front_adapter_source_list == 'file':
                -g file:'${adapter_options.internal}${fa.front_adapter_source.front_adapter_file}'
            #else if str($fa.front_adapter_source.front_adapter_name) != "":
                -g '${fa.front_adapter_source.front_adapter_name}'='${adapter_options.internal}${fa.front_adapter_source.front_adapter}'
            #else
                -g '${adapter_options.internal}${fa.front_adapter_source.front_adapter}'
            #end if
        #end for

        #if str($library.r1.cut) != '0':
            -u $library.r1.cut
        #end if

        ## Additional Outputs

        #if 'info_file' in $output_selector:
            --info-file=$info_file
        #end if
        #if 'rest_file' in $output_selector:
            --rest-file='${rest_output}'
        #end if
        #if 'wildcard_file' in $output_selector:
            --wildcard-file='${wild_output}'
        #end if
        #if 'too_short_file' in $output_selector:
            --too-short-output='${too_short_output}'
        #end if
        #if 'too_long_file' in $output_selector:
            --too-long-output='${too_long_output}'
        #end if
        #if 'untrimmed_file' in $output_selector:
            --untrimmed-output='${untrimmed_output}'
        #end if

    ]]></token>

    <token name="@read2_options@"><![CDATA[

        ## Read2 trimming

        #for $a in $library.r2.adapters2
            #if $a.adapter_source2.adapter_source_list2 == 'builtin':
                -A '${a.adapter_source2.adapter2.fields.name}'='${a.adapter_source2.adapter2}${adapter_options.internal}'
            #else if $a.adapter_source2.adapter_source_list2 == 'file':
                -A file:'${a.adapter_source2.adapter_file2}${adapter_options.internal}'
            #else if str($a.adapter_source2.adapter_name2) != "":
                -A '${a.adapter_source2.adapter_name2}'='${a.adapter_source2.adapter2}${adapter_options.internal}'
            #else
                -A '${a.adapter_source2.adapter2}${adapter_options.internal}'
            #end if
        #end for
        #for $aa in $library.r2.anywhere_adapters2
            #if $aa.anywhere_adapter_source2.anywhere_adapter_source_list2 == 'builtin':
                -B '${aa.anywhere_adapter_source2.anywhere_adapter2.fields.name}'='${aa.anywhere_adapter_source2.anywhere_adapter2}'
            #else if $aa.anywhere_adapter_source2.anywhere_adapter_source_list2 == 'file':
                -B file:'${aa.anywhere_adapter_source2.anywhere_adapter_file2}'
            #else if str($aa.anywhere_adapter_source2.anywhere_adapter_name2) != "":
                -B '${aa.anywhere_adapter_source2.anywhere_adapter_name2}'='${aa.anywhere_adapter_source2.anywhere_adapter2}'
            #else
                -B '${aa.anywhere_adapter_source2.anywhere_adapter2}'
            #end if
        #end for
        #for $fa in $library.r2.front_adapters2
            #if $fa.front_adapter_source2.front_adapter_source_list2 == 'builtin':
                -G '${fa.front_adapter_source2.front_adapter2.fields.name}'='${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}'
            #else if $fa.front_adapter_source2.front_adapter_source_list2  == 'file':
                -G file:'${adapter_options.internal}${fa.front_adapter_source2.front_adapter_file2}'
            #else if str($fa.front_adapter_source2.front_adapter_name2) != "":
                -G '${fa.front_adapter_source2.front_adapter_name2}'='${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}'
            #else
                -G '${adapter_options.internal}${fa.front_adapter_source2.front_adapter2}'
            #end if
        #end for

        #if str($library.r2.cut2) != '0':
            -U $library.r2.cut2
        #end if

        ## Additional Outputs - Read 2

        #if 'too_short_file' in $output_selector:
            --too-short-paired-output='${too_short_paired_output}'
        #end if
        #if 'too_long_file' in $output_selector:
            --too-long-paired-output='${too_long_paired_output}'
        #end if
        #if 'untrimmed_file' in $output_selector:
            --untrimmed-paired-output='${untrimmed_paired_output}'
        #end if

    ]]></token>

        <xml name="adapter_sanitizer">
            <sanitizer>
                <valid initial="string.digits">
                    <add value="A"/>
                    <add value="T"/>
                    <add value="C"/>
                    <add value="G"/>

                    <add value="U"/>
                    <add value="R"/>
                    <add value="Y"/>
                    <add value="S"/>
                    <add value="W"/>
                    <add value="K"/>
                    <add value="M"/>
                    <add value="B"/>
                    <add value="D"/>
                    <add value="H"/>
                    <add value="V"/>
                    <add value="N"/>

                    <add value="X"/>

                    <add value="{"/>
                    <add value="}"/>

                    <add value="^"/>
                    <add value="$"/>
                    <add value="."/>
                    <add value="("/>
                    <add value=")"/>

                </valid>
            </sanitizer>
        </xml>

        <xml name="adapter" token_name="" token_argument="" token_value="" token_label="">
            <param name="@NAME@" argument="@ARGUMENT@" type="text" value="@VALUE@" label="@LABEL@">
                <expand macro="adapter_sanitizer"/>
            </param>
        </xml>

        <xml name="adapter_select" token_name="" token_argument="" token_label="">
            <param name="@NAME@" argument="@ARGUMENT@" type="select" label="@LABEL@">
                <options from_data_table="adapters">
                    <filter type="sort_by" column="1" />
                </options>
                <expand macro="adapter_sanitizer"/>
            </param>
        </xml>

        <xml name="single_end_options" >

                <repeat name="adapters" title="3' (End) Adapters" help="Sequence of an adapter ligated to the 3' end (paired data: of the first read). The adapter and subsequent bases are trimmed. If a '$' character is appended ('anchoring'), the adapter is only found if it is a suffix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
                    <conditional name="adapter_source">
                        <param name="adapter_source_list" type="select" label="Source" >
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="adapter_name" type="text" value="" optional="True" label="Enter custom 3' adapter name (Optional if Multiple output is 'No')" />
                            <expand macro="adapter" name="adapter" argument="-a" type="text" value="AATTGGCC" label="Enter custom 3' adapter sequence" />
                        </when>

                        <when value="builtin">
                            <expand macro="adapter_select" name="adapter" argument="-a" label="Choose 3' adapter"/>
                        </when>

                        <when value="file">
                            <param name="adapter_file" argument="-a" format="fasta" type="data" help="Should be of datatype FASTA" label="Choose file containing 3' adapters" />
                        </when>
                    </conditional>
                </repeat>

                <repeat name="front_adapters" title="5' (Front) Adapters" help="Sequence of an adapter ligated to the 5' end (paired data: of the first read). The adapter and any preceding bases are trimmed. Partial matches at the 5' end are allowed. If a '^' character is prepended ('anchoring'), the adapter is only found if it is a prefix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
                    <conditional name="front_adapter_source">
                        <param name="front_adapter_source_list" type="select" label="Source">
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="front_adapter_name" type="text" value="" optional="True" label="Enter custom 5' adapter name (Optional if Multiple output is 'No')" />
                            <expand macro="adapter" name="front_adapter" argument="-g" value="AATTGGCC" label="Enter custom 5' adapter sequence" />
                        </when>
                        <when value="builtin">
                            <expand macro="adapter_select" name="front_adapter" argument="-g" label="Choose 5' adapter"/>
                        </when>
                        <when value="file">
                            <param name="front_adapter_file" argument="-g" format="fasta" type="data" help="Should be of datatype "FASTA"" label="Choose file containing 5' adapters" />
                        </when>
                    </conditional>
                </repeat>

                <repeat name="anywhere_adapters" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that may be ligated to the 5' or 3' end (paired data: of the first read). Both types of matches as described under 3' und 5' Adapters are allowed. If the first base of the read is part of the match, the behavior is as with 5' Adapters, otherwise as with 3' Adapters. This option is mostly for rescuing failed library preparations - do not use if you know which end your adapter was ligated to!">
                    <conditional name="anywhere_adapter_source">
                        <param name="anywhere_adapter_source_list" type="select" label="Source">
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="anywhere_adapter_name" type="text" value="" optional="True" label="Enter custom 5' or 3' adapter name (Optional if Multiple output is 'No')"  />
                            <expand macro="adapter" name="anywhere_adapter" argument="-b" value="AATTGGCC" label="Enter custom 5' or 3' adapter sequence" />
                        </when>
                        <when value="builtin">
                            <expand macro="adapter_select" name="anywhere_adapter" argument="-b" label="Choose 5' or 3' adapter"/>
                        </when>
                        <when value="file">
                            <param name="anywhere_adapter_file" argument="-b" format="fasta" type="data" help="Should be of datatype "FASTA"" label="Choose file containing 3' or 5' adapters" />
                        </when>
                    </conditional>
                </repeat>

                <param name="cut" argument="--cut" type="integer" value="0" optional="True" label="Cut bases from reads before adapter trimming" help="Remove bases from each read (first read only if paired). If positive, remove bases from the beginning. If negative, remove bases from the end. This is applied *before* adapter trimming." />

        </xml>

        <xml name="paired_end_options" >

            <expand macro="single_end_options" />

                <repeat name="adapters2" title="3' (End) Adapters" help="Sequence of an adapter ligated to the 3' end of the second read in each pair. The adapter and subsequent bases are trimmed. If a '$' character is appended ('anchoring'), the adapter is only found if it is a suffix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
                    <conditional name="adapter_source2">
                        <param name="adapter_source_list2" type="select" label="Source" >
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="adapter_name2" type="text" value="" optional="True" label="Enter custom 3' adapter name (Optional)" />
                            <expand macro="adapter" name="adapter2" argument="-A" label="Enter custom 3' adapter sequence" value="AATTGGCC" />
                        </when>

                        <when value="builtin">
                            <expand macro="adapter_select" name="adapter2" argument="-A" label="Choose 3' adapter"/>
                        </when>
                        <when value="file">
                            <param name="adapter_file2" argument="-a" format="fasta" type="data" help="Should be of datatype "FASTA"" label="Choose file containing 3' adapters" />
                        </when>
                    </conditional>
                </repeat>

                <repeat name="front_adapters2" title="5' (Front) Adapters" help="Sequence of an adapter ligated to the 5' end of the second read in each pair. The adapter and any preceding bases are trimmed. Partial matches at the 5' end are allowed. If a '^' character is prepended ('anchoring'), the adapter is only found if it is a prefix of the read. To search for a linked adapter, separate the 2 sequences with 3 dots (ADAPTER1...ADAPTER2), see Help below.">
                    <conditional name="front_adapter_source2">
                        <param name="front_adapter_source_list2" type="select" label="Source">
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="front_adapter_name2" type="text" value="" label="Enter custom 5' adapter name (Optional)" />
                            <expand macro="adapter" name="front_adapter2" argument="-G" value="AATTGGCC" label="Enter custom 5' adapter sequence" />
                        </when>
                        <when value="builtin">
                            <expand macro="adapter_select" name="front_adapter2" argument="-G" label="Choose 5' adapter"/>
                        </when>
                        <when value="file">
                            <param name="front_adapter_file2" argument="-g" format="fasta" type="data" help="Should be of datatype "FASTA"" label="Choose file containing 5' adapters" />
                        </when>
                    </conditional>
                </repeat>

                <repeat name="anywhere_adapters2" title="5' or 3' (Anywhere) Adapters" help="Sequence of an adapter that may be ligated to the 5' or 3' end of the second read in each pair. Both types of matches as described under under 3' und 5' Adapters are allowed. If the first base of the read is part of the match, the behavior is as with 5' Adapters, otherwise as with 3' Adapters. This option is mostly for rescuing failed library preparations - do not use if you know which end your adapter was ligated to!">
                    <conditional name="anywhere_adapter_source2">
                        <param name="anywhere_adapter_source_list2" type="select" label="Source">
                            <option value="builtin" selected="True">Standard (select from the list below)</option>
                            <option value="user">Enter custom sequence</option>
                            <option value="file">File from history</option>
                        </param>

                        <when value="user">
                            <param name="anywhere_adapter_name2" type="text" value="" optional="True" label="Enter custom 5' or 3' adapter name (Optional)" />
                            <expand macro="adapter" name="anywhere_adapter2" argument="-B" label="Enter custom 5' or 3' adapter sequence" value="AATTGGCC" />
                        </when>
                        <when value="builtin">
                            <expand macro="adapter_select" name="anywhere_adapter2" argument="-B" type="select" label="Choose 5' or 3' adapter"/>
                        </when>
                        <when value="file">
                            <param name="anywhere_adapter_file2" argument="-b" format="fasta" type="data" help="Should be of datatype "FASTA"" label="Choose file containing 3' or 5' adapters" />
                        </when>
                    </conditional>
                </repeat>

            <param name="cut2" argument="-U" type="integer" value="0" optional="True" label="Cut bases from the second read in each pair." help="Remove bases from the beginning or end of each read before trimming adapters. If positive, the bases are removed from the beginning of each read. If negative, the bases are removed from the end of each read." />

        </xml>

        <xml name="inherit_format_1">
            <actions>
                <conditional name="library.type">
                    <when value="single">
                        <action type="format">
                            <option type="from_param" name="library.input_1" param_attribute="ext" />
                        </action>
                    </when>
                    <when value="paired">
                        <action type="format">
                            <option type="from_param" name="library.input_1" param_attribute="ext" />
                        </action>
                    </when>
                </conditional>
            </actions>
        </xml>

        <xml name="inherit_format_2">
            <actions>
                <conditional name="library.type">
                    <when value="paired">
                        <action type="format">
                            <option type="from_param" name="library.input_2" param_attribute="ext" />
                        </action>
                    </when>
                </conditional>
            </actions>
        </xml>

</macros>


'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var tooltip = require('primereact/tooltip');
var utils = require('primereact/utils');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n["default"] = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);

function _extends() {
  _extends = Object.assign || function (target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];

      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }

    return target;
  };

  return _extends.apply(this, arguments);
}

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

function _arrayWithHoles(arr) {
  if (Array.isArray(arr)) return arr;
}

function _iterableToArrayLimit(arr, i) {
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];

  if (_i == null) return;
  var _arr = [];
  var _n = true;
  var _d = false;

  var _s, _e;

  try {
    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);

      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }

  return _arr;
}

function _arrayLikeToArray(arr, len) {
  if (len == null || len > arr.length) len = arr.length;

  for (var i = 0, arr2 = new Array(len); i < len; i++) {
    arr2[i] = arr[i];
  }

  return arr2;
}

function _unsupportedIterableToArray(o, minLen) {
  if (!o) return;
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  var n = Object.prototype.toString.call(o).slice(8, -1);
  if (n === "Object" && o.constructor) n = o.constructor.name;
  if (n === "Map" || n === "Set") return Array.from(o);
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}

function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

function _slicedToArray(arr, i) {
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var InputSwitch = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
  var _React$useState = React__namespace.useState(false),
      _React$useState2 = _slicedToArray(_React$useState, 2),
      focusedState = _React$useState2[0],
      setFocusedState = _React$useState2[1];

  var elementRef = React__namespace.useRef(null);
  var inputRef = React__namespace.useRef(props.inputRef);
  var checked = props.checked === props.trueValue;

  var onClick = function onClick(event) {
    if (props.disabled) {
      return;
    }

    toggle(event);
    utils.DomHandler.focus(inputRef.current);
    event.preventDefault();
  };

  var toggle = function toggle(event) {
    if (props.onChange) {
      var value = checked ? props.falseValue : props.trueValue;
      props.onChange({
        originalEvent: event,
        value: value,
        stopPropagation: function stopPropagation() {},
        preventDefault: function preventDefault() {},
        target: {
          name: props.name,
          id: props.id,
          value: value
        }
      });
    }
  };

  var onFocus = function onFocus(event) {
    setFocusedState(true);
    props.onFocus && props.onFocus(event);
  };

  var onBlur = function onBlur(event) {
    setFocusedState(false);
    props.onBlur && props.onBlur(event);
  };

  React__namespace.useImperativeHandle(ref, function () {
    return _objectSpread({
      getElement: function getElement() {
        return elementRef.current;
      },
      getInput: function getInput() {
        return elementRef.current;
      }
    }, props);
  });
  React__namespace.useEffect(function () {
    utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
  }, [inputRef, props.inputRef]);
  var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
  var otherProps = utils.ObjectUtils.findDiffKeys(props, InputSwitch.defaultProps);
  var className = utils.classNames('p-inputswitch p-component', {
    'p-inputswitch-checked': checked,
    'p-disabled': props.disabled,
    'p-focus': focusedState
  }, props.className);
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
    ref: elementRef,
    id: props.id,
    className: className,
    style: props.style
  }, otherProps, {
    onClick: onClick,
    role: "checkbox",
    "aria-checked": checked
  }), /*#__PURE__*/React__namespace.createElement("div", {
    className: "p-hidden-accessible"
  }, /*#__PURE__*/React__namespace.createElement("input", {
    ref: inputRef,
    type: "checkbox",
    id: props.inputId,
    name: props.name,
    checked: checked,
    onChange: toggle,
    onFocus: onFocus,
    onBlur: onBlur,
    disabled: props.disabled,
    role: "switch",
    tabIndex: props.tabIndex,
    "aria-checked": checked,
    "aria-labelledby": props['aria-labelledby'],
    "aria-label": props['aria-label']
  })), /*#__PURE__*/React__namespace.createElement("span", {
    className: "p-inputswitch-slider"
  })), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
    target: elementRef,
    content: props.tooltip
  }, props.tooltipOptions)));
}));
InputSwitch.displayName = 'InputSwitch';
InputSwitch.defaultProps = {
  __TYPE: 'InputSwitch',
  id: null,
  inputRef: null,
  style: null,
  className: null,
  inputId: null,
  name: null,
  tabIndex: null,
  checked: false,
  trueValue: true,
  falseValue: false,
  disabled: false,
  tooltip: null,
  tooltipOptions: null,
  'aria-label': null,
  'aria-labelledby': null,
  onChange: null,
  onFocus: null,
  onBlur: null
};

exports.InputSwitch = InputSwitch;


var Event = function Event(Title, WorldWar, SocialStability, TechnologicalProgress, Message, Event_Variable) {
  this.Title = Title;
  this.WorldWar = WorldWar;
  this.SocialStability = SocialStability;
  this.TechnologicalProgress = TechnologicalProgress;
  this.Message = Message;
  this.Event_Variable = Event_Variable;
}

//Protoype allows us to implement pseudoclasses into Javascript.
//It is necessary to define the 'call' method on the Event Constructor so that we can trigger the
//event's effects.
Event.prototype = {
  call: function() {
    Metrics.WorldWar += this.WorldWar;
    Metrics.SocialStability += this.SocialStability;
    Metrics.TechnologicalProgress += this.TechnologicalProgress;
    if (this.Event_Variable == "CityFive")
    {
      CityFive = true;
    }
    return (this.Message + "<button class='deleteEvent' id='"+this.Title+"'>Delete</button>")
  }
};

//An EmptyEvent exist if you delete an event from the Timeline. It is created
//so that I don't have to worry about calling "undefined" events.
var EmptyEvent = function () {
}

//At the beginning of the game, the following four events are inserted into the Timeline and are triggered.
//new Event(WorldWar, SocialStability, TechnologicalProgress, Message, optional Event_Varaible)
var CityFiveBuilt = new Event("CityFiveBuilt",-20,0,20, CITY_FIVE_BUILT,"CityFive")

var TheOrder = new Event("TheOrder",0,20,-20, THE_ORDER);
//In the original version of Zybourne Clock, Dr. Zybourne developed his time-travelling Clock after the World War. But I do not want to implement events being dependent on each other until AFTER the MVP.
var ClockInvented = new Event("ClockInvented", -20,0,20, CLOCK_INVENTED);

var Zepplins = new Event("Zepplins",-20,20,0, ZEPPLINS);

//These events are in the Player's hand at the start of Zybourne Clock Redux. This is just a MVP, so I only have two events here for now.
var ChildSpybots = new Event("ChildSpybots",20,-20,0, CHILD_SPYBOTS)

var Vaundermause = new Event("Vaundermause",20,0,-20, VAUNDERMAUSE)

var SocialPlanningRevolution = new Event("SocialPlanningRevolution",-40,20,20, SOCIAL_PLANNING)

var Nanotech = new Event("Nanotech",20,-40,20, NANOTECH)

var LuddistCrusade = new Event("LuddistCrusade",0,40,-40, LUDDIST_CRUSADE)

var Timeline = []

var PlayerHand = [ChildSpybots, Vaundermause, SocialPlanningRevolution, Nanotech, LuddistCrusade]


using System;
using System.Collections.Generic;
using System.Linq;

using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace Linq2TwitterSample
{
	// The UIApplicationDelegate for the application. This class is responsible for launching the
	// User Interface of the application, as well as listening (and optionally responding) to
	// application events from iOS.
	[Register ("AppDelegate")]
	public partial class AppDelegate : UIApplicationDelegate
	{
		// class-level declarations

		public override UIWindow Window {
			get;
			set;
		}

		// This method is invoked when the application is about to move from active to inactive state.
		// OpenGL applications should use this method to pause.
		public override void OnResignActivation (UIApplication application)
		{
		}

		// This method should be used to release shared resources and it should store the application state.
		// If your application supports background exection this method is called instead of WillTerminate
		// when the user quits.
		public override void DidEnterBackground (UIApplication application)
		{
		}

		// This method is called as part of the transiton from background to active state.
		public override void WillEnterForeground (UIApplication application)
		{
		}

		// This method is called when the application is about to terminate. Save data, if needed.
		public override void WillTerminate (UIApplication application)
		{
		}
	}
}


package nl.soccar.library.test;

import java.time.LocalTime;
import java.util.Optional;
import nl.soccar.library.Event;
import nl.soccar.library.Game;
import nl.soccar.library.Player;
import nl.soccar.library.enumeration.CarType;
import nl.soccar.library.enumeration.Duration;
import nl.soccar.library.enumeration.EventType;
import nl.soccar.library.enumeration.GameStatus;
import nl.soccar.library.enumeration.Privilege;
import nl.soccar.ui.DisplayConstants;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * JUnit test that tests the nl.soccar.library.Game class.
 *
 * @author PTS34A
 */
public class GameTest {

    // Declaration of test objects.
    private Player player;
    private Event event;
    private Game game;

    /**
     * Instantiation of test objects.
     */
    @Before
    public void setUp() {
        player = new Player("username", Privilege.NORMAL, CarType.CASUAL);
        event = new Event(EventType.GOAL_RED, LocalTime.of(13, 55, 03), player);
        game = new Game();
    }

    /**
     * Tests the start method.
     */
    @Test
    public void startTest() {
        game.start();
        assertEquals(GameStatus.RUNNING, game.getStatus());
    }

    /**
     * Tests the stop method.
     */
    @Test
    public void stopTest() {
        game.stop();
        assertEquals(GameStatus.STOPPED, game.getStatus());
    }

    /**
     * Tests the addEvent and getEvents methods.
     */
    @Test
    public void addEventAndGetEventsTest() {
        game.addEvent(event);
        assertEquals(event, game.getEvents().get(0));
    }

    /**
     * Tests the getStarttime method.
     */
    @Test
    public void getStartTimeTest() {
        assertEquals(Optional.empty(), game.getStartTime());
    }

    /**
     * Tests the getStatus and setStatus methods.
     */
    @Test
    public void getStatusAndSetStatusTest() {
        assertEquals(GameStatus.STOPPED, game.getStatus());
        game.setStatus(GameStatus.SCORED);
        assertEquals(GameStatus.SCORED, game.getStatus());
    }

    /**
     * Tests the getDuration and setDuration methods.
     */
    @Test
    public void getDurationAndSetDurationTest() {
        game.setDuration(Duration.MINUTES_3);
        assertEquals(Duration.MINUTES_3, game.getDuration());
    }

    /**
     * Tests the getMap method.
     */
    @Test
    public void getMapTest() {
        assertEquals(0, Math.round(game.getMap().getSize().getX()));
        assertEquals(0, Math.round(game.getMap().getSize().getY()));
        assertEquals(Math.round(DisplayConstants.MAP_WIDTH), Math.round(game.getMap().getSize().getWidth()));
        assertEquals(Math.round(DisplayConstants.MAP_HEIGHT), Math.round(game.getMap().getSize().getHeight()));
    }

    /**
     * Tests the getLastBallTouched andSetLastBallTouched methods.
     */
    @Test
    public void getLastBallTouchedAndSetLastBallTouchedTest() {
        game.setLastBallTouched(player);
        assertEquals(player, game.getLastBallTouched());
    }

}


// tjh Headers
#include "../src/Publisher.h"

// System Headers
#include <functional>
#include <memory>
#include <iostream>
#include <string>

namespace tjh
{
namespace example
{

//! A listener class which subscribes to an exterior publication.
class Client
{
public:
    //! @note: There is no constraint requiring an IPublisher to be passed into the
    //! constructor of a listener, this pattern was simply used to demonstrate the
    //! mechanism of subscription. The shared_ptr callback and the IPublisher object
    //! just, at some point, need to exist in the same scope.
    Client(IPublisher<int, const std::string&>& publisher)
    {
        // If the Client is going to subsribe to publications, it needs to create
        // a callback object. This callback object is a shared_ptr owned by the
        // Client; the callback will have the same life-span as the naked
        // "this" created within the bound function. This ensures that the
        // bound function is either valid, or its parent shared_ptr has
        // already been destructed because the object itself no longer exists.
        _callback =
            tjh::make_callback(&Client::handler, this);

        // The shared_ptr is provided to the IPublisher interface, and the IPublisher
        // interface holds a weak_ptr that is checked for validity before the callback is
        // fired.
        publisher.subscribe(_callback);
    }

private:
    void handler(int a, const std::string& b)
    {
        // Published arguments!
        std::cout << __FUNCTION__ << ": a=" << a << ", b=" << b << std::endl;

        // Upon receiving a publication from the subscriber, the listener has determined
        // it no longer needs to exist, so it deletes itself. This deletion nulls the
        // weak_ptr held in the IPublisher object which will be cleaned up during the
        // next publication.
        // @note: The below line ONLY works if the object was heap allocated; if the
        //        object was allocated on the stack, a double deletion will occur.
        delete this;
    }

    // The callback object enforces the requirement that this instance's lifetime is the
    // same as the contained function's lifetime.
    std::shared_ptr<std::function<void(int, const std::string&)>> _callback;
};

class Primary : public IPublisher<int, const std::string&>
{
public:
    virtual void subscribe(std::weak_ptr<std::function<void(int, const std::string&)> > callback)
    {
        // This is a simple pass through to the composed publisher.
        _publisher.subscribe(callback);
    }

    void doSomething(int a, const std::string& b)
    {
        // Publish the contents of a and b to any listeners.
        _publisher.publish(a, b);
    }

private:
    tjh::Publisher<Primary, int, const std::string&> _publisher;
};

} // end example
} // end tjh

#endif // EXAMPLE_H


module RspecWiki
  class Markdown

    attr_reader :context

    def initialize context
      @context = context
    end

    def anchor_link
      { anchor_group => "* [#{title_with_status}](#{RspecWiki.configuration.wiki_page_url}##{title_anchor})"}
    end

    def anchor_group
      return "#{h3}#{context.metadata[:group]}" if context.metadata[:group].present?
      described_class = context.described_class.split("::").last
      described_class.gsub!('Controller', '')
      described_class.underscore.humanize.prepend(h3)
    end

    def print
      <<-EOC
#{header}
#{body}
#{footer}
      EOC
    end

    def header
      "#{h3}#{title}"
    end

    def body
      <<-EOC
#{description}
#{url} | #{request_method}

#{parameters}

Response
#{status}
#{javascript(context.response_body)}
      EOC
    end

    def footer
      <<-EOC
#{ back_to_table_of_content }

#{ '='*100 }
      EOC
    end

    def description
      <<-EOC
`#{context.content}`
      EOC
    end

    def status
      "Status: \`#{context.response_status}\`"
    end

    def parameters
      "Parameters: #{format_params}"
    end

    def url
      "URL: __#{context.request_path}__"
    end

    def request_method
      "Method: \`#{context.request_method}\`"
    end

    private

    def title
      (context.metadata[:title] || context.content).humanize
    end

    def title_with_status
      status = context.response_success? ? "(SUCCESS)" : "(ERROR)"
      "#{title} #{status}"
    end

    def title_anchor
      title.downcase.gsub(/\s+/, '-')
    end

    def format_params
      context.params.collect do |key, value|
        "\`#{key}\` => #{value}"
      end.join("\n\n")
    end

    def h3
      '###'
    end

    def javascript content
      <<-EOC
```javascript
#{content}
```
      EOC
    end

    def back_to_table_of_content
      "[Back to table of contents](#{RspecWiki.configuration.wiki_page_url}#table-of-contents)"
    end
  end
end


ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Graphina chloroleuca Müll. Arg.

### Remarks
null


//===----------------------------------------------------------------------===//
//
//                         Peloton
//
// abstract_scan_executor.h
//
// Identification: src/include/executor/abstract_scan_executor.h
//
// Copyright (c) 2015-17, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//

#pragma once

#include "executor/abstract_executor.h"
#include "planner/abstract_scan_plan.h"
#include "type/types.h"

namespace peloton {
namespace executor {

/**
 * Super class for different kinds of scan executor.
 * It provides common codes for all kinds of scan:
 * evaluate generic predicates and simple projections.
 */
class AbstractScanExecutor : public AbstractExecutor {
 public:
  AbstractScanExecutor(const AbstractScanExecutor &) = delete;
  AbstractScanExecutor &operator=(const AbstractScanExecutor &) = delete;
  AbstractScanExecutor(AbstractScanExecutor &&) = delete;
  AbstractScanExecutor &operator=(AbstractScanExecutor &&) = delete;

  explicit AbstractScanExecutor(const planner::AbstractPlan *node,
                                ExecutorContext *executor_context);

  virtual void UpdatePredicate(const std::vector<oid_t> &column_ids
                                   UNUSED_ATTRIBUTE,
                               const std::vector<type::Value> &values
                                   UNUSED_ATTRIBUTE) {}

  virtual void ResetState() {}

 protected:
  bool DInit();

  virtual bool DExecute() = 0;

 protected:
  //===--------------------------------------------------------------------===//
  // Plan Info
  //===--------------------------------------------------------------------===//

  /** @brief Selection predicate. */
  const expression::AbstractExpression *predicate_ = nullptr;

  /** @brief Columns from tile group to be added to logical tile output. */
  std::vector<oid_t> column_ids_;
};

}  // namespace executor
}  // namespace peloton


"""
Test for controlnet.py
"""

import unittest
from mininet.util import pexpect

from sys import stdout

class testControlNet( unittest.TestCase ):

    prompt = 'mininet>'

    def testPingall( self ):
        "Simple pingall test that verifies 0% packet drop in data network"
        p = pexpect.spawn( 'python -m mininet.examples.controlnet', logfile=stdout)
        p.expect( self.prompt )
        p.sendline( 'pingall' )
        p.expect ( '(\d+)% dropped' )
        percent = int( p.match.group( 1 ) ) if p.match else -1
        self.assertEqual( percent, 0 )
        p.expect( self.prompt )
        p.sendline( 'exit' )
        p.wait()

    def testFailover( self ):
        "Kill controllers and verify that switch, s1, fails over properly"
        count = 1
        p = pexpect.spawn( 'python -m mininet.examples.controlnet', logfile=stdout )
        p.expect( self.prompt )
        lp = pexpect.spawn( 'tail -f /tmp/s1-ofp.log', logfile=stdout )
        lp.expect( 'tcp:\d+\.\d+\.\d+\.(\d+):\d+: connected' )
        ip = int( lp.match.group( 1 ) )
        self.assertEqual( count, ip )
        count += 1
        for c in [ 'c0', 'c1' ]:
            p.sendline( '%s ifconfig %s-eth0 down' % ( c, c) )
            p.expect( self.prompt )
            lp.expect( 'tcp:\d+\.\d+\.\d+\.(\d+):\d+: connected' )
            ip = int( lp.match.group( 1 ) )
            self.assertEqual( count, ip )
            count += 1
        p.sendline( 'exit' )
        p.wait()

if __name__ == '__main__':
    unittest.main()


package org.apache.activemq.plugin.util;

import java.util.Set;

import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.DestinationFilter;
import org.apache.activemq.broker.region.Queue;
import org.apache.activemq.broker.region.RegionBroker;
import org.apache.activemq.broker.region.Topic;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.plugin.AbstractRuntimeConfigurationBroker;

public class PolicyEntryUtil {

    /**
     * Find a matching PolicyEntry by looking up the Set of entries from the map and
     * then comparing the destination to find the exact match.  This lets us be able to
     * find the correct policy entry to update even though there might be multiple that
     * are returned from the get method of the PolicyMap.
     *
     * @param runtimeBroker
     * @param entry
     * @return
     */
    public static PolicyEntry findEntryByDestination(AbstractRuntimeConfigurationBroker runtimeBroker,
            PolicyEntry entry) {

        PolicyMap existingMap = runtimeBroker.getBrokerService().getDestinationPolicy();
        @SuppressWarnings("unchecked")
        Set<PolicyEntry> existingEntries = existingMap.get(entry.getDestination());

        //First just look up by the destination type to see if anything matches
        PolicyEntry existingEntry = null;
        for (PolicyEntry ee: existingEntries) {
            if (ee.getDestination().equals(entry.getDestination())) {
                existingEntry = ee;
                break;
            }
        }
        return existingEntry;
    }

    /**
     * Utility to properly apply an updated policy entry to all existing destinations that
     * match this entry.  The destination will only be updated if the policy is the exact
     * policy (most specific) that matches the destination.
     *
     * @param runtimeBroker
     * @param updatedEntry
     */
    public static void applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker,
            PolicyEntry updatedEntry) {
        PolicyEntryUtil.applyRetrospectively(runtimeBroker, updatedEntry, null);
    }

    /**
     *
     * Utility to properly apply an updated policy entry to all existing destinations that
     * match this entry.  The destination will only be updated if the policy is the exact
     * policy (most specific) that matches the destination.
     *
     * The includedProperties List is optional and is used to specify a list of properties
     * to apply retrospectively to the matching destinations. This allows only certain properties
     * to be reapplied.  If the list is null then all properties will be applied.
     *
     * @param runtimeBroker
     * @param updatedEntry
     * @param includedProperties
     */
    public static void applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker,
            PolicyEntry updatedEntry, Set<String> includedProperties) {
        RegionBroker regionBroker = (RegionBroker) runtimeBroker.getBrokerService().getRegionBroker();
        for (Destination destination : regionBroker.getDestinations(updatedEntry.getDestination())) {
            //Look up the policy that applies to the destination
            PolicyEntry specificyPolicy = regionBroker.getDestinationPolicy().getEntryFor(
                    destination.getActiveMQDestination());

            //only update the destination if it matches the specific policy being updated
            //currently just an identity check which is what we want
            if (updatedEntry.equals(specificyPolicy)){
                Destination target = destination;
                while (target instanceof DestinationFilter) {
                    target = ((DestinationFilter)target).getNext();
                }
                //If we are providing a list of properties to set then use them
                //to set eligible properties that are in the includedProperties list
                if (target.getActiveMQDestination().isQueue()) {
                    updatedEntry.update((Queue) target, includedProperties);
                } else if (target.getActiveMQDestination().isTopic()) {
                    updatedEntry.update((Topic) target, includedProperties);
                }
                runtimeBroker.debug("applied update to:" + target);
            }
        }
    }
}


module Syntax where

data Type =
    TyBool
  | TyNat
          deriving (Show, Eq)

data Term =
    TmTrue
  | TmFalse
  | TmIf Term Term Term
  | TmZero
  | TmSucc Term
  | TmPred Term
  | TmIsZero Term
          deriving Show

type Error = String


<?php

namespace App\ApiModule\Presenters;

use Nette\Application\UI\Presenter;
use Nette\Http;

abstract class BasePresenter extends Presenter
{
    public function error($message = NULL, $code = Http\IResponse::S404_NOT_FOUND)
    {
        $this->getHttpResponse()->setCode($code);

        $this->sendJson([
            'success' => false,
            'error' => $code,
            'message' => $message
        ]);
    }

}


<?php

if (!defined('CC_CRON')) { echo "NO DICE"; exit; }

include_once(dirname(__FILE__).DIRECTORY_SEPARATOR."config.php");

if ((!empty($_REQUEST['cron']['type']) && $_REQUEST['cron']['type'] == "all") || !empty($_REQUEST['cron']['modules'])) {
	chatrooms();
	chatroommessages();
	chatroomsusers();
} else {
	if(isset($_REQUEST['cron']['inactiverooms'])){chatrooms();}
	if(isset($_REQUEST['cron']['chatroommessages'])){chatroommessages();}
	if(isset($_REQUEST['cron']['inactiveusers'])){chatroomsusers();}
}

function chatrooms() {
	global $chatroomTimeout;
	$sql = ("delete from cometchat_chatrooms where createdby <> 0 and lastactivity < (".getTimeStamp()."- ".$chatroomTimeout." )");
	$query = mysqli_query($GLOBALS['dbh'],$sql);
	if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); }
}

function chatroommessages() {
	$sql = ("delete from cometchat_chatroommessages where sent < (".getTimeStamp()."-10800)");
	$query = mysqli_query($GLOBALS['dbh'],$sql);
	if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); }
}

function chatroomsusers() {
	$sql = ("delete from cometchat_chatrooms_users where lastactivity < (".getTimeStamp()."-3600)");
	$query = mysqli_query($GLOBALS['dbh'],$sql);
	if (defined('DEV_MODE') && DEV_MODE == '1') { echo mysqli_error($GLOBALS['dbh']); }
}


package io.advantageous.qbit.service.dispatchers;

import io.advantageous.qbit.service.ServiceBuilder;
import io.advantageous.qbit.service.ServiceQueue;

import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;

public class ShardedServiceWorkerBuilder {

    /**
     * Shard rule, if you don't set a shard rule, you get shard of first argument.
     * Shard rule by default.
     */
    private ShardRule shardRule;
    private ServiceBuilder serviceBuilder;
    private ServiceWorkers serviceDispatcher;
    private int workerCount = -1;
    private int flushInterval = -1;
    private TimeUnit timeUnit = TimeUnit.MILLISECONDS;
    private Supplier<Object> serviceObjectSupplier;

    public static ShardedServiceWorkerBuilder shardedServiceWorkerBuilder() {
        return new ShardedServiceWorkerBuilder();
    }

    public Supplier<Object> getServiceObjectSupplier() {
        return serviceObjectSupplier;
    }

    public ShardedServiceWorkerBuilder setServiceObjectSupplier(Supplier<Object> serviceObjectSupplier) {
        this.serviceObjectSupplier = serviceObjectSupplier;
        return this;
    }

    public int getWorkerCount() {
        if (workerCount == -1) {
            workerCount = Runtime.getRuntime().availableProcessors();
        }
        return workerCount;
    }

    public ShardedServiceWorkerBuilder setWorkerCount(int workerCount) {
        this.workerCount = workerCount;
        return this;
    }

    public ShardRule getShardRule() {
        if (shardRule == null) {
            final int workerCount = this.getWorkerCount();
            shardRule = (methodName, methodArgs, numWorkers) -> methodArgs[0].hashCode() % workerCount;
        }
        return shardRule;
    }

    public ShardedServiceWorkerBuilder setShardRule(ShardRule shardRule) {
        this.shardRule = shardRule;
        return this;
    }

    public ServiceBuilder getServiceBuilder() {
        if (serviceBuilder == null) {
            serviceBuilder = ServiceBuilder.serviceBuilder();
            return serviceBuilder;
        }
        return serviceBuilder.copy();
    }

    public ShardedServiceWorkerBuilder setServiceBuilder(ServiceBuilder serviceBuilder) {
        this.serviceBuilder = serviceBuilder;
        return this;
    }

    public ServiceWorkers getServiceDispatcher() {
        if (serviceDispatcher == null) {

            if (this.flushInterval == -1) {
                serviceDispatcher = ServiceWorkers.shardedWorkers(getShardRule());
            } else {
                serviceDispatcher = ServiceWorkers.shardedWorkers(getFlushInterval(),
                        getTimeUnit(), getShardRule());
            }
        }
        return serviceDispatcher;
    }

    public ShardedServiceWorkerBuilder setServiceDispatcher(ServiceWorkers serviceDispatcher) {
        this.serviceDispatcher = serviceDispatcher;
        return this;
    }

    public int getFlushInterval() {
        return flushInterval;
    }

    public ShardedServiceWorkerBuilder setFlushInterval(int flushInterval) {
        this.flushInterval = flushInterval;
        return this;
    }

    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public ShardedServiceWorkerBuilder setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
        return this;
    }

    public ServiceMethodDispatcher build() {

        if (getServiceObjectSupplier() == null) {
            throw new IllegalStateException("serviceObjectSupplier must be set");
        }
        final ServiceBuilder serviceBuilder = getServiceBuilder();

        for (int index = 0; index < getWorkerCount(); index++) {
            final ServiceQueue serviceQueue = serviceBuilder
                    .setServiceObject(getServiceObjectSupplier().get()).build();
            getServiceDispatcher().addServices(serviceQueue);

        }
        return getServiceDispatcher();

    }
}


<?php

namespace Opulence\Routing\Routes\Compilers;

use Opulence\Http\Requests\Request;
use Opulence\Routing\Routes\CompiledRoute;
use Opulence\Routing\Routes\Compilers\Matchers\HostMatcher;
use Opulence\Routing\Routes\Compilers\Matchers\IRouteMatcher;
use Opulence\Routing\Routes\Compilers\Matchers\PathMatcher;
use Opulence\Routing\Routes\ParsedRoute;

/**
 * Defines a route compiler
 */
class Compiler implements ICompiler
{
    /** @var IRouteMatcher[] The list of route matchers used by the compiler */
    private $routeMatchers = [];

    /**
     * @param IRouteMatcher[] $routeMatchers The list of route matchers to use
     */
    public function __construct(array $routeMatchers)
    {
        $this->routeMatchers = $routeMatchers;
    }

    /**
     * @inheritdoc
     */
    public function compile(ParsedRoute $route, Request $request) : CompiledRoute
    {
        $hostMatches = [];
        $pathMatches = [];

        foreach ($this->routeMatchers as $routeMatcher) {
            if ($routeMatcher instanceof HostMatcher && !$routeMatcher->isMatch($route, $request, $hostMatches)) {
                return new CompiledRoute($route, false);
            } elseif ($routeMatcher instanceof PathMatcher && !$routeMatcher->isMatch($route, $request, $pathMatches)) {
                return new CompiledRoute($route, false);
            } elseif (!$routeMatcher->isMatch($route, $request)) {
                return new CompiledRoute($route, false);
            }
        }

        // If we've gotten here, then all the matchers matched
        $pathVars = array_merge($hostMatches, $pathMatches);

        return new CompiledRoute($route, true, $pathVars);
    }
}


/**
 * Generate HTTP headers from auth credentials
 * @param  {AuthCredentials} props
 * @return {Promise}      - promise that resolves with the headers
 */
export function getAuthenticationHeaders(props) {
    if (!props) {
        throw new Error('Must provide authentication information.');
    }

    // JWT always have priority over a simple app token
    if (props.jwt) {
        return {
            'Authorization': 'Bearer ' + props.jwt
        };
    } else if (props.appToken) {
        return {
            'app-token': props.appToken
        };
    }

    throw new Error('Must provide a JWT or a app token');
}


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.apache</groupId>
    <artifactId>rocketmq-hbase</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>rocketmq-hbase-sink</module>
        <module>rocketmq-hbase-source</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.test.skip>false</maven.test.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <rocketmq.version>4.2.0</rocketmq.version>
        <hbase.version>1.4.4</hbase.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.rocketmq</groupId>
            <artifactId>rocketmq-client</artifactId>
            <version>${rocketmq.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-server</artifactId>
            <version>${hbase.version}</version>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-testing-util</artifactId>
            <version>${hbase.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.rocketmq</groupId>
            <artifactId>rocketmq-namesrv</artifactId>
            <version>${rocketmq.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.rocketmq</groupId>
            <artifactId>rocketmq-broker</artifactId>
            <version>${rocketmq.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-tcnative</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <executions>
                    <execution>
                        <id>verify</id>
                        <phase>verify</phase>
                        <configuration>
                            <configLocation>style/rmq_checkstyle.xml</configLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeTestSourceDirectory>false</includeTestSourceDirectory>
                            <includeTestResources>false</includeTestResources>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


class CertDbInitializer;

// Factory that manages creation of CertDbInitializer. The initialization is
// handled differently depending on the environment:
// * On real ChromeOS devices with TPMs:
// ** if the user is affiliated: CertDbInitializer is automatically
// created right after its profile is created. It receives a path to software
// cert database and slot IDs for Chaps from Ash and uses them.
// ** if the user is not affiliated: TODO(b/197082753): not officially supported
// yet, handled as if there's no TPM.
// * In emulated environments (e.g. when running ChromeOS on Linux) and in the
// future on ChromeOS without TPMs: Same as real ChromeOS, but Ash only sends
// the software database path.
// * In browsertests: CertDbInitializer is not created by default because it
// requires crosapi mojo interface. It is configured through the
// `SetCreateWithBrowserContextForTesting()` method. This can be overridden by
// individual tests or they can create their own instances of the service.
// * In unittests: CertDbInitializer is not created by default (see
// `ServiceIsNULLWhileTesting()`).
class CertDbInitializerFactory : public BrowserContextKeyedServiceFactory {
 public:
  static CertDbInitializerFactory* GetInstance();
  static CertDbInitializer* GetForBrowserContext(
      content::BrowserContext* context);

  // Configures whether CertDbInitializer should be automatically created on
  // profile creation in browser tests.
  // Currently it is configured that in browser tests the service is not created
  // by default. Individual tests can override it when needed.
  void SetCreateWithBrowserContextForTesting(bool should_create);

 private:
  friend class base::NoDestructor<CertDbInitializerFactory>;

  CertDbInitializerFactory();
  ~CertDbInitializerFactory() override = default;

  // BrowserStateKeyedServiceFactory
  bool ServiceIsCreatedWithBrowserContext() const override;
  KeyedService* BuildServiceInstanceFor(
      content::BrowserContext* context) const override;
  bool ServiceIsNULLWhileTesting() const override;
  content::BrowserContext* GetBrowserContextToUse(
      content::BrowserContext* context) const override;

  bool should_create_with_browser_context_ = true;
};

#endif  // CHROME_BROWSER_LACROS_CERT_DB_INITIALIZER_FACTORY_H_


module Azure::ARM::ServiceBus
  module Models
    #
    # Parameters supplied to the Create Or Update Subscription operation.
    #
    class SubscriptionCreateOrUpdateParameters

      include MsRestAzure

      # @return [String] Subscription data center location.
      attr_accessor :location

      # @return [String] Resource manager type of the resource.
      attr_accessor :type

      # @return [DateTime] Last time there was a receive request to this
      # subscription.
      attr_accessor :accessed_at

      # @return [String] TimeSpan idle interval after which the topic is
      # automatically deleted. The minimum duration is 5 minutes.
      attr_accessor :auto_delete_on_idle

      # @return [MessageCountDetails]
      attr_accessor :count_details

      # @return [DateTime] Exact time the message was created.
      attr_accessor :created_at

      # @return [String] Default message time to live value. This is the
      # duration after which the message expires, starting from when the
      # message is sent to Service Bus. This is the default value used when
      # TimeToLive is not set on a message itself.
      attr_accessor :default_message_time_to_live

      # @return [Boolean] Value that indicates whether a subscription has dead
      # letter support on filter evaluation exceptions.
      attr_accessor :dead_lettering_on_filter_evaluation_exceptions

      # @return [Boolean] Value that indicates whether a subscription has dead
      # letter support when a message expires.
      attr_accessor :dead_lettering_on_message_expiration

      # @return [Boolean] Value that indicates whether server-side batched
      # operations are enabled.
      attr_accessor :enable_batched_operations

      # @return [EntityAvailabilityStatus] Entity availability status for the
      # topic. Possible values include: 'Available', 'Limited', 'Renaming',
      # 'Restoring', 'Unknown'
      attr_accessor :entity_availability_status

      # @return [Boolean] Value that indicates whether the entity description
      # is read-only.
      attr_accessor :is_read_only

      # @return [String] The lock duration time span for the subscription.
      attr_accessor :lock_duration

      # @return [Integer] Number of maximum deliveries.
      attr_accessor :max_delivery_count

      # @return [Integer] Number of messages.
      attr_accessor :message_count

      # @return [Boolean] Value indicating if a subscription supports the
      # concept of sessions.
      attr_accessor :requires_session

      # @return [EntityStatus] Enumerates the possible values for the status of
      # a messaging entity. Possible values include: 'Active', 'Creating',
      # 'Deleting', 'Disabled', 'ReceiveDisabled', 'Renaming', 'Restoring',
      # 'SendDisabled', 'Unknown'
      attr_accessor :status

      # @return [DateTime] The exact time the message was updated.
      attr_accessor :updated_at

      #
      # Mapper for SubscriptionCreateOrUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          required: false,
          serialized_name: 'SubscriptionCreateOrUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'SubscriptionCreateOrUpdateParameters',
            model_properties: {
              location: {
                required: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              type: {
                required: false,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              accessed_at: {
                required: false,
                serialized_name: 'properties.accessedAt',
                type: {
                  name: 'DateTime'
                }
              },
              auto_delete_on_idle: {
                required: false,
                serialized_name: 'properties.autoDeleteOnIdle',
                type: {
                  name: 'String'
                }
              },
              count_details: {
                required: false,
                serialized_name: 'properties.countDetails',
                type: {
                  name: 'Composite',
                  class_name: 'MessageCountDetails'
                }
              },
              created_at: {
                required: false,
                serialized_name: 'properties.createdAt',
                type: {
                  name: 'DateTime'
                }
              },
              default_message_time_to_live: {
                required: false,
                serialized_name: 'properties.defaultMessageTimeToLive',
                type: {
                  name: 'String'
                }
              },
              dead_lettering_on_filter_evaluation_exceptions: {
                required: false,
                serialized_name: 'properties.deadLetteringOnFilterEvaluationExceptions',
                type: {
                  name: 'Boolean'
                }
              },
              dead_lettering_on_message_expiration: {
                required: false,
                serialized_name: 'properties.deadLetteringOnMessageExpiration',
                type: {
                  name: 'Boolean'
                }
              },
              enable_batched_operations: {
                required: false,
                serialized_name: 'properties.enableBatchedOperations',
                type: {
                  name: 'Boolean'
                }
              },
              entity_availability_status: {
                required: false,
                serialized_name: 'properties.entityAvailabilityStatus',
                type: {
                  name: 'Enum',
                  module: 'EntityAvailabilityStatus'
                }
              },
              is_read_only: {
                required: false,
                serialized_name: 'properties.isReadOnly',
                type: {
                  name: 'Boolean'
                }
              },
              lock_duration: {
                required: false,
                serialized_name: 'properties.lockDuration',
                type: {
                  name: 'String'
                }
              },
              max_delivery_count: {
                required: false,
                serialized_name: 'properties.maxDeliveryCount',
                type: {
                  name: 'Number'
                }
              },
              message_count: {
                required: false,
                serialized_name: 'properties.messageCount',
                type: {
                  name: 'Number'
                }
              },
              requires_session: {
                required: false,
                serialized_name: 'properties.requiresSession',
                type: {
                  name: 'Boolean'
                }
              },
              status: {
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'Enum',
                  module: 'EntityStatus'
                }
              },
              updated_at: {
                required: false,
                serialized_name: 'properties.updatedAt',
                type: {
                  name: 'DateTime'
                }
              }
            }
          }
        }
      end
    end
  end
end