text:
package com.currencycloud.client;

import com.currencycloud.client.model.*;

import javax.annotation.Nullable;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * This is the low-level Currency Cloud HTTP API Java implementation. This interface's methods map directly to
 * the HTTP endpoints, as described in the HTTP API documentation.
 */
@Path("v2")
@Produces(MediaType.APPLICATION_JSON)
public interface CurrencyCloud {

    ///////////////////////////////////////////////////////////////////
    ///// AUTHENTICATE API ////////////////////////////////////////////

    /** API User Login */
    @POST
    @Path("authenticate/api")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @NoAutoAuth
    AuthenticateResponse authenticate(
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("login_id") String loginId,
            @FormParam("api_key") String apiKey
    ) throws ResponseException;

    /** End API session */
    @POST
    @Path("authenticate/close_session")
    @NoAutoAuth
    Object endSession(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// ACCOUNTS API ////////////////////////////////////////////////

    /** Create Account */
    @POST
    @Path("accounts/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Account createAccount(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("account_name") String accountName,
            @FormParam("legal_entity_type") String legalEntityType,
            @FormParam("street") String street,
            @FormParam("city") String city,
            @FormParam("postal_code") String postalCode,
            @FormParam("country") String country,
            @Nullable @FormParam("state_or_province") String stateOrProvince,
            @Nullable @FormParam("brand") String brand,
            @Nullable @FormParam("your_reference") String yourReference,
            @Nullable @FormParam("status") String status,
            @Nullable @FormParam("spread_table") String spreadTable,
            @Nullable @FormParam("identification_type") String identificationType,
            @Nullable @FormParam("identification_value") String identificationValue,
            @Nullable @FormParam("api_trading") Boolean apiTrading,
            @Nullable @FormParam("online_trading") Boolean onlineTrading,
            @Nullable @FormParam("phone_trading") Boolean phoneTrading,
            @Nullable @FormParam("terms_and_conditions_accepted") Boolean termsAndConditionsAccepted
    ) throws ResponseException;

    /** Retrieve an Account */
    @GET
    @Path("accounts/{id}")
    Account retrieveAccount(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String accountId,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Update an Account */
    @POST
    @Path("accounts/{id}")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Account updateAccount(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String accountId,
            @Nullable @FormParam("account_name") String accountName,
            @Nullable @FormParam("legal_entity_type") String legalEntityType,
            @Nullable @FormParam("your_reference") String yourReference,
            @Nullable @FormParam("status") String status,
            @Nullable @FormParam("street") String street,
            @Nullable @FormParam("city") String city,
            @Nullable @FormParam("state_or_province") String stateOrProvince,
            @Nullable @FormParam("postal_code") String postalCode,
            @Nullable @FormParam("country") String country,
            @Nullable @FormParam("spread_table") String spreadTable,
            @Nullable @FormParam("identification_type") String identificationType,
            @Nullable @FormParam("identification_value") String identificationValue
    ) throws ResponseException;

    /** Find Account */
    @GET
    @Path("accounts/find")
    Accounts findAccounts(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_name") String accountName,
            @Nullable @QueryParam("legal_entity_type") String legalEntityType,
            @Nullable @QueryParam("brand") String brand,
            @Nullable @QueryParam("your_reference") String yourReference,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("street") String street,
            @Nullable @QueryParam("city") String city,
            @Nullable @QueryParam("state_or_province") String stateOrProvince,
            @Nullable @QueryParam("postal_code") String postalCode,
            @Nullable @QueryParam("country") String country,
            @Nullable @QueryParam("spread_table") String spreadTable,
            @Nullable @QueryParam("bank_account_verified") String bankAccountVerified,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Account (logged-in Contact) */
    @GET
    @Path("accounts/current")
    Account currentAccount(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent
    ) throws ResponseException;

    /** Retrieve an Accounts Payment Charge Settings */
    @GET
    @Path("/accounts/{account_id}/payment_charges_settings")
    AccountPaymentChargesSettings retrieveAccountsPaymentChargeSettings(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("account_id") String accountId
    ) throws ResponseException;

    /** Update an Accounts Payment Charge Settings */
    @POST
    @Path("/accounts/{account_id}/payment_charges_settings/{charge_settings_id}")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    AccountPaymentChargesSetting updateAccountsPaymentChargeSettings(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("account_id") String accountId,
            @PathParam("charge_settings_id") String chargeSettingsId,
            @Nullable @FormParam("enabled") Boolean enabled,
            @Nullable @FormParam("default") Boolean isDefault
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// BALANCES API ////////////////////////////////////////////////

    /** Find Balances */
    @GET
    @Path("balances/find")
    Balances findBalances(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("amount_from") BigDecimal amountFrom,
            @Nullable @QueryParam("amount_to") BigDecimal amountTo,
            @Nullable @QueryParam("as_at_date") Date asAtDate,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Retrieve a Balance */
    @GET
    @Path("balances/{currency}")
    Balance retrieveBalance(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("currency") String currency,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Top Up Margin Balance */
    @POST
    @Path("balances/top_up_margin")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    MarginBalanceTopUp topUpMarginBalance(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("currency") String currency,
            @FormParam("amount") BigDecimal amount,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// BENEFICIARIES API ///////////////////////////////////////////

    /** Validate Beneficiary bank details */
    @POST
    @Path("beneficiaries/validate")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Beneficiary validateBeneficiary(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("bank_country") String bankCountry,
            @FormParam("currency") String currency,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("beneficiary_address") String beneficiaryAddress,
            @Nullable @FormParam("beneficiary_country") String beneficiaryCountry,
            @Nullable @FormParam("account_number") String accountNumber,
            @Nullable @FormParam("routing_code_type_1") String routingCodeType1,
            @Nullable @FormParam("routing_code_value_1") String routingCodeValue1,
            @Nullable @FormParam("routing_code_type_2") String routingCodeType2,
            @Nullable @FormParam("routing_code_value_2") String routingCodeValue2,
            @Nullable @FormParam("bic_swift") String bicSwift,
            @Nullable @FormParam("iban") String iban,
            @Nullable @FormParam("bank_address[]") List<String> bankAddress,
            @Nullable @FormParam("bank_name") String bankName,
            @Nullable @FormParam("bank_account_type") String bankAccountType,
            @Nullable @FormParam("beneficiary_entity_type") String beneficiaryEntityType,
            @Nullable @FormParam("beneficiary_company_name") String beneficiaryCompanyName,
            @Nullable @FormParam("beneficiary_first_name") String beneficiaryFirstName,
            @Nullable @FormParam("beneficiary_last_name") String beneficiaryLastName,
            @Nullable @FormParam("beneficiary_city") String beneficiaryCity,
            @Nullable @FormParam("beneficiary_postcode") String beneficiaryPostcode,
            @Nullable @FormParam("beneficiary_state_or_province") String beneficiaryStateOrProvince,
            @Nullable @FormParam("beneficiary_date_of_birth") java.sql.Date beneficiaryDateOfBirth,
            @Nullable @FormParam("beneficiary_identification_type") String beneficiaryIdentificationType,
            @Nullable @FormParam("beneficiary_identification_value") String beneficiaryIdentificationValue,
            @Nullable @FormParam("payment_types[]") List<String> paymentTypes
    ) throws ResponseException;

    /** Create Beneficiary */
    @POST
    @Path("beneficiaries/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Beneficiary createBeneficiary(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("bank_account_holder_name") String bankAccountHolderName,
            @FormParam("bank_country") String bankCountry,
            @FormParam("currency") String currency,
            @FormParam("name") String name,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("email") String email,
            @Nullable @FormParam("beneficiary_address") String beneficiaryAddress,
            @Nullable @FormParam("beneficiary_country") String beneficiaryCountry,
            @Nullable @FormParam("account_number") String accountNumber,
            @Nullable @FormParam("routing_code_type_1") String routingCodeType1,
            @Nullable @FormParam("routing_code_value_1") String routingCodeValue1,
            @Nullable @FormParam("routing_code_type_2") String routingCodeType2,
            @Nullable @FormParam("routing_code_value_2") String routingCodeValue2,
            @Nullable @FormParam("bic_swift") String bicSwift,
            @Nullable @FormParam("iban") String iban,
            @Nullable @FormParam("default_beneficiary") Boolean defaultBeneficiary,
            @Nullable @FormParam("bank_address[]") List<String> bankAddress,
            @Nullable @FormParam("bank_name") String bankName,
            @Nullable @FormParam("bank_account_type") String bankAccountType,
            @Nullable @FormParam("beneficiary_entity_type") String beneficiaryEntityType,
            @Nullable @FormParam("beneficiary_company_name") String beneficiaryCompanyName,
            @Nullable @FormParam("beneficiary_first_name") String beneficiaryFirstName,
            @Nullable @FormParam("beneficiary_last_name") String beneficiaryLastName,
            @Nullable @FormParam("beneficiary_city") String beneficiaryCity,
            @Nullable @FormParam("beneficiary_postcode") String beneficiaryPostcode,
            @Nullable @FormParam("beneficiary_state_or_province") String beneficiaryStateOrProvince,
            @Nullable @FormParam("beneficiary_date_of_birth") java.sql.Date beneficiaryDateOfBirth,
            @Nullable @FormParam("beneficiary_identification_type") String beneficiaryIdentificationType,
            @Nullable @FormParam("beneficiary_identification_value") String beneficiaryIdentificationValue,
            @Nullable @FormParam("beneficiary_external_reference") String beneficiaryExternalReference,
            @Nullable @FormParam("payment_types[]") List<String> paymentTypes
    ) throws ResponseException;

    /** Retrieve a Beneficiary */
    @GET
    @Path("beneficiaries/{id}")
    Beneficiary retrieveBeneficiary(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Update a Beneficiary */
    @POST
    @Path("beneficiaries/{id}")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Beneficiary updateBeneficiary(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String beneficiaryId,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("bank_account_holder_name") String bankAccountHolderName,
            @Nullable @FormParam("bank_country") String bankCountry,
            @Nullable @FormParam("currency") String currency,
            @Nullable @FormParam("name") String name,
            @Nullable @FormParam("email") String email,
            @Nullable @FormParam("beneficiary_address") String beneficiaryAddress,
            @Nullable @FormParam("beneficiary_country") String beneficiaryCountry,
            @Nullable @FormParam("account_number") String accountNumber,
            @Nullable @FormParam("routing_code_type_1") String routingCodeType1,
            @Nullable @FormParam("routing_code_value_1") String routingCodeValue1,
            @Nullable @FormParam("routing_code_type_2") String routingCodeType2,
            @Nullable @FormParam("routing_code_value_2") String routingCodeValue2,
            @Nullable @FormParam("bic_swift") String bicSwift,
            @Nullable @FormParam("iban") String iban,
            @Nullable @FormParam("default_beneficiary") Boolean defaultBeneficiary,
            @Nullable @FormParam("bank_address[]") List<String> bankAddress,
            @Nullable @FormParam("bank_name") String bankName,
            @Nullable @FormParam("bank_account_type") String bankAccountType,
            @Nullable @FormParam("beneficiary_entity_type") String beneficiaryEntityType,
            @Nullable @FormParam("beneficiary_company_name") String beneficiaryCompanyName,
            @Nullable @FormParam("beneficiary_first_name") String beneficiaryFirstName,
            @Nullable @FormParam("beneficiary_last_name") String beneficiaryLastName,
            @Nullable @FormParam("beneficiary_city") String beneficiaryCity,
            @Nullable @FormParam("beneficiary_postcode") String beneficiaryPostcode,
            @Nullable @FormParam("beneficiary_state_or_province") String beneficiaryStateOrProvince,
            @Nullable @FormParam("beneficiary_date_of_birth") java.sql.Date beneficiaryDateOfBirth,
            @Nullable @FormParam("beneficiary_identification_type") String beneficiaryIdentificationType,
            @Nullable @FormParam("beneficiary_identification_value") String beneficiaryIdentificationValue,
            @Nullable @FormParam("beneficiary_external_reference") String beneficiaryExternalReference,
            @Nullable @FormParam("payment_types[]") List<String> paymentTypes
    ) throws ResponseException;

    /** Find Beneficiaries */
    @GET
    @Path("beneficiaries/find")
    Beneficiaries findBeneficiaries(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("bank_account_holder_name") String bankAccountHolderName,
            @Nullable @QueryParam("beneficiary_country") String beneficiaryCountry,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("account_number") String accountNumber,
            @Nullable @QueryParam("routing_code_type") String routingCodeType,
            @Nullable @QueryParam("routing_code_value") String routingCodeValue,
            @Nullable @QueryParam("payment_types[]") List<String> paymentTypes,
            @Nullable @QueryParam("bic_swift") String bicSwift,
            @Nullable @QueryParam("iban") String iban,
            @Nullable @QueryParam("default_beneficiary") Boolean defaultBeneficiary,
            @Nullable @QueryParam("bank_name") String bankName,
            @Nullable @QueryParam("bank_account_type") String bankAccountType,
            @Nullable @QueryParam("name") String name,
            @Nullable @QueryParam("beneficiary_entity_type") String beneficiaryEntityType,
            @Nullable @QueryParam("beneficiary_company_name") String beneficiaryCompanyName,
            @Nullable @QueryParam("beneficiary_first_name") String beneficiaryFirstName,
            @Nullable @QueryParam("beneficiary_last_name") String beneficiaryLastName,
            @Nullable @QueryParam("beneficiary_city") String beneficiaryCity,
            @Nullable @QueryParam("beneficiary_postcode") String beneficiaryPostcode,
            @Nullable @QueryParam("beneficiary_state_or_province") String beneficiaryStateOrProvince,
            @Nullable @QueryParam("beneficiary_date_of_birth") java.sql.Date beneficiaryDateOfBirth,
            @Nullable @QueryParam("beneficiary_external_reference") String beneficiaryExternalReference,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Delete Beneficiary */
    @POST
    @Path("beneficiaries/{id}/delete")
    Beneficiary deleteBeneficiary(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// CONTACTS API ////////////////////////////////////////////////

    /** Create Contact */
    @POST
    @Path("contacts/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Contact createContact(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("account_id") String accountId,
            @FormParam("first_name") String firstName,
            @FormParam("last_name") String lastName,
            @FormParam("email_address") String emailAddress,
            @FormParam("phone_number") String phoneNumber,
            @Nullable @FormParam("your_reference") String yourReference,
            @Nullable @FormParam("mobile_phone_number") String mobilePhoneNumber,
            @Nullable @FormParam("login_id") String loginId,
            @Nullable @FormParam("status") String status,
            @Nullable @FormParam("locale") String locale,
            @Nullable @FormParam("timezone") String timezone,
            @Nullable @FormParam("date_of_birth") java.sql.Date dateOfBirth
    ) throws ResponseException;

    /** Retrieve a Contact */
    @GET
    @Path("contacts/{id}")
    Contact retrieveContact(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String contactId
    ) throws ResponseException;

    /** Update a Contact */
    @POST
    @Path("contacts/{id}")
    Contact updateContact(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String contactId,
            @Nullable @FormParam("first_name") String firstName,
            @Nullable @FormParam("last_name") String lastName,
            @Nullable @FormParam("email_address") String emailAddress,
            @Nullable @FormParam("phone_number") String phoneNumber,
            @Nullable @FormParam("your_reference") String yourReference,
            @Nullable @FormParam("mobile_phone_number") String mobilePhoneNumber,
            @Nullable @FormParam("login_id") String loginId,
            @Nullable @FormParam("status") String status,
            @Nullable @FormParam("locale") String locale,
            @Nullable @FormParam("timezone") String timezone,
            @Nullable @FormParam("date_of_birth") java.sql.Date dateOfBirth
    ) throws ResponseException;

    /** Find Contact */
    @GET
    @Path("contacts/find")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Contacts findContacts(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_name") String accountName,
            @Nullable @QueryParam("account_id") String accountId,
            @Nullable @QueryParam("first_name") String firstName,
            @Nullable @QueryParam("last_name") String lastName,
            @Nullable @QueryParam("email_address") String emailAddress,
            @Nullable @QueryParam("your_reference") String yourReference,
            @Nullable @QueryParam("phone_number") String phoneNumber,
            @Nullable @QueryParam("login_id") String loginId,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("locale") String locale,
            @Nullable @QueryParam("timezone") String timezone,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Contact (logged-in Contact) */
    @GET
    @Path("contacts/current")
    Contact currentContact(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// CONVERSIONS API /////////////////////////////////////////////

    /** Create a Conversion */
    @POST
    @Path("conversions/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Conversion createConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("buy_currency") String buyCurrency,
            @FormParam("sell_currency") String sellCurrency,
            @FormParam("fixed_side") String fixedSide,
            @FormParam("amount") BigDecimal amount,
            @FormParam("term_agreement") Boolean termAgreement,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("conversion_date") Date conversionDate,
            @Nullable @FormParam("client_buy_amount") BigDecimal clientBuyAmount,
            @Nullable @FormParam("client_sell_amount") BigDecimal clientSellAmount,
            @Nullable @FormParam("reason") String reason,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId,
            @Nullable @FormParam("conversion_date_preference") String conversionDatePreference
    ) throws ResponseException;

    /** Retrieve a Conversion */
    @GET
    @Path("conversions/{id}")
    Conversion retrieveConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String conversionId
    ) throws ResponseException;

    /** Find a Conversion */
    @GET
    @Path("conversions/find")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Conversions findConversions(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("short_reference") String shortReference,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("buy_currency") String buyCurrency,
            @Nullable @QueryParam("sell_currency") String sellCurrency,
            @Nullable @QueryParam("conversion_ids[]") Collection<String> conversionIds,
            @Nullable @QueryParam("created_at_from") Date createdAtFrom,
            @Nullable @QueryParam("created_at_to") Date createdAtTo,
            @Nullable @QueryParam("updated_at_from") Date updatedAtFrom,
            @Nullable @QueryParam("updated_at_to") Date updatedAtTo,
            @Nullable @QueryParam("conversion_date_from") Date ConversionDateFrom,
            @Nullable @QueryParam("conversion_date_to") Date ConversionDateTo,
            @Nullable @QueryParam("currency_pair") String currencyPair,
            @Nullable @QueryParam("partner_buy_amount_from") BigDecimal partnerBuyAmountFrom,
            @Nullable @QueryParam("partner_buy_amount_to") BigDecimal partnerBuyAmountTo,
            @Nullable @QueryParam("partner_sell_amount_from") BigDecimal partnerSellAmountFrom,
            @Nullable @QueryParam("partner_sell_amount_to") BigDecimal partnerSellAmountTo,
            @Nullable @QueryParam("buy_amount_from") BigDecimal buyAmountFrom,
            @Nullable @QueryParam("buy_amount_to") BigDecimal buyAmountTo,
            @Nullable @QueryParam("sell_amount_from") BigDecimal sellAmountFrom,
            @Nullable @QueryParam("sell_amount_to") BigDecimal sellAmountTo,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("settlement_date_from") Date SettlementDateFrom,
            @Nullable @QueryParam("settlement_date_to") Date SettlementDateTo,
            @Nullable @QueryParam("unique_request_id") String uniqueRequestId,
            @Nullable @QueryParam("bulk_upload_id") String bulkUploadId,
            @Nullable @QueryParam("unallocated_funds") BigDecimal unallocatedFunds,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Cancel a Conversion */
    @POST
    @Path("conversions/{id}/cancel")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionCancellation cancelConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @FormParam("notes") String notes
    ) throws ResponseException;

    @GET
    @Path("conversions/{id}/cancellation_quote")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionCancellationQuote quoteCancelConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id
    ) throws ResponseException;

    @GET
    @Path("conversions/{id}/date_change_quote")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionDateChange quoteChangeDateConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @QueryParam("new_settlement_date") Date newSettlementDate
    ) throws ResponseException;

    @POST
    @Path("conversions/{id}/date_change")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionDateChange changeDateConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @FormParam("new_settlement_date") Date newSettlementDate
    ) throws ResponseException;

    @GET
    @Path("conversions/{id}/date_change/details")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionDateChangeDetails changeDateDetailsConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @PathParam("id") String id
    ) throws ResponseException;

    @GET
    @Path("conversions/{id}/split_preview")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionSplit previewSplitConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @QueryParam("amount") BigDecimal amount
    ) throws ResponseException;

    @POST
    @Path("conversions/{id}/split")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionSplit splitConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @FormParam("amount") BigDecimal amount
    ) throws ResponseException;

    @GET
    @Path("conversions/{id}/split_history")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionSplitHistory historySplitConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id
    ) throws ResponseException;

    @GET
    @Path("conversions/profit_and_loss")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionProfitAndLosses retrieveProfitAndLossConversion(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_id") String accountId,
            @Nullable @QueryParam("contact_id") String contactId,
            @Nullable @QueryParam("conversion_id") String conversionId,
            @Nullable @QueryParam("event_type") String evenType,
            @Nullable @QueryParam("event_date_time_from") Date eventDateTimeFrom,
            @Nullable @QueryParam("event_date_time_to") Date eventDateTimeTo,
            @Nullable @QueryParam("amount_from") BigDecimal amountFrom,
            @Nullable @QueryParam("amount_to") BigDecimal amountTo,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// FUNDING API ///////////////////////////////////////////////////

    /** Find FundingAccounts */
    @GET
    @Path("funding_accounts/find")
    FundingAccounts findFundingAccounts(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("currency") String currency,
            @Nullable @QueryParam("account_id") String accountId,
            @Nullable @QueryParam("payment_type") String paymentType,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// PAYERS API ///////////////////////////////////////////////////

    /** Retrieve a Payer */
    @GET
    @Path("payers/{id}")
    Payer retrievePayer(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String payerId
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// PAYMENTS API ////////////////////////////////////////////////

    /** Create a Payment */
    @POST
    @Path("payments/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Payment createPayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("currency") String currency,
            @FormParam("beneficiary_id") String beneficiaryId,
            @FormParam("amount") BigDecimal amount,
            @FormParam("reason") String reason,
            @FormParam("reference") String reference,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("payment_date") java.sql.Date paymentDate,
            @Nullable @FormParam("payment_type") String paymentType,
            @Nullable @FormParam("conversion_id") String conversionId,
            @Nullable @FormParam("payer_entity_type") String payerEntityType,
            @Nullable @FormParam("payer_company_name") String payerCompanyName,
            @Nullable @FormParam("payer_first_name") String payerFirstName,
            @Nullable @FormParam("payer_last_name") String payerLastName,
            @Nullable @FormParam("payer_address") String payerAddress,
            @Nullable @FormParam("payer_city") String payerCity,
            @Nullable @FormParam("payer_country") String payerCountry,
            @Nullable @FormParam("payer_postcode") String payerPostcode,
            @Nullable @FormParam("payer_state_or_province") String payerStateOrProvince,
            @Nullable @FormParam("payer_date_of_birth") java.sql.Date payerDateOfBirth,
            @Nullable @FormParam("payer_identification_type") String payerIdentificationType,
            @Nullable @FormParam("payer_identification_value") String payerIdentificationValue,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId,
            @Nullable @FormParam("ultimate_beneficiary_name") String ultimateBeneficiaryName,
            @Nullable @FormParam("purpose_code") String purposeCode,
            @Nullable @FormParam("charge_type") String chargeType,
            @Nullable @FormParam("fee_amount") BigDecimal feeAmount,
            @Nullable @FormParam("fee_currency") String feeCurrency
    ) throws ResponseException;

    /** Validate a Payment */
    @POST
    @Path("payments/validate")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    PaymentValidationResult validatePayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @HeaderParam("x-sca-force-sms") Boolean scaForceSms,
            @FormParam("currency") String currency,
            @FormParam("beneficiary_id") String beneficiaryId,
            @FormParam("amount") BigDecimal amount,
            @FormParam("reason") String reason,
            @FormParam("reference") String reference,
            @Nullable @FormParam("id") String paymentId,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("payment_date") java.sql.Date paymentDate,
            @Nullable @FormParam("payment_type") String paymentType,
            @Nullable @FormParam("conversion_id") String conversionId,
            @Nullable @FormParam("payer_entity_type") String payerEntityType,
            @Nullable @FormParam("payer_company_name") String payerCompanyName,
            @Nullable @FormParam("payer_first_name") String payerFirstName,
            @Nullable @FormParam("payer_last_name") String payerLastName,
            @Nullable @FormParam("payer_address") String payerAddress,
            @Nullable @FormParam("payer_city") String payerCity,
            @Nullable @FormParam("payer_country") String payerCountry,
            @Nullable @FormParam("payer_postcode") String payerPostcode,
            @Nullable @FormParam("payer_state_or_province") String payerStateOrProvince,
            @Nullable @FormParam("payer_date_of_birth") java.sql.Date payerDateOfBirth,
            @Nullable @FormParam("payer_identification_type") String payerIdentificationType,
            @Nullable @FormParam("payer_identification_value") String payerIdentificationValue,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId,
            @Nullable @FormParam("ultimate_beneficiary_name") String ultimateBeneficiaryName,
            @Nullable @FormParam("purpose_code") String purposeCode,
            @Nullable @FormParam("charge_type") String chargeType,
            @Nullable @FormParam("fee_amount") BigDecimal feeAmount,
            @Nullable @FormParam("fee_currency") String feeCurrency
    ) throws ResponseException;

    /** Authorise a Payment */
    @POST
    @Path("payments/authorise")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    PaymentAuthorisations authorisePayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("payment_ids[]") List<String> paymentIds
    ) throws ResponseException;

    /** Retrieve a Payment */
    @GET
    @Path("payments/{id}")
    Payment retrievePayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("with_deleted") Boolean withDeleted,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Update a Payment */
    @POST
    @Path("payments/{id}")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Payment updatePayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String paymentId,
            @FormParam("currency") String currency,
            @FormParam("beneficiary_id") String beneficiaryId,
            @FormParam("amount") BigDecimal amount,
            @FormParam("reason") String reason,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("reference") String reference,
            @Nullable @FormParam("payment_date") java.sql.Date paymentDate,
            @Nullable @FormParam("payment_type") String paymentType,
            @Nullable @FormParam("conversion_id") String conversionId,
            @Nullable @FormParam("payer_entity_type") String payerEntityType,
            @Nullable @FormParam("payer_company_name") String payerCompanyName,
            @Nullable @FormParam("payer_first_name") String payerFirstName,
            @Nullable @FormParam("payer_last_name") String payerLastName,
            @Nullable @FormParam("payer_address") String payerAddress,
            @Nullable @FormParam("payer_city") String payerCity,
            @Nullable @FormParam("payer_country") String payerCountry,
            @Nullable @FormParam("payer_postcode") String payerPostcode,
            @Nullable @FormParam("payer_state_or_province") String payerStateOrProvince,
            @Nullable @FormParam("payer_date_of_birth") java.sql.Date payerDateOfBirth,
            @Nullable @FormParam("payer_identification_type") String payerIdentificationType,
            @Nullable @FormParam("payer_identification_value") String payerIdentificationValue,
            @Nullable @FormParam("payer_details_source") String payerDetailsSource,
            @Nullable @FormParam("ultimate_beneficiary_name") String ultimateBeneficiaryName,
            @Nullable @FormParam("purpose_code") String purposeCode,
            @Nullable @FormParam("charge_type") String chargeType,
            @Nullable @FormParam("fee_amount") BigDecimal feeAmount,
            @Nullable @FormParam("fee_currency") String feeCurrency
    ) throws ResponseException;

    /** Find Payments */
    @GET
    @Path("payments/find")
    Payments findPayments(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("short_reference") String shortReference,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("amount") BigDecimal amount,
            @Nullable @QueryParam("amount_from") BigDecimal amountFrom,
            @Nullable @QueryParam("amount_to") BigDecimal amountTo,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("reason") String reason,
            @Nullable @QueryParam("payment_date_from") java.sql.Date paymentDateFrom,
            @Nullable @QueryParam("payment_date_to") java.sql.Date paymentDateTo,
            @Nullable @QueryParam("transferred_at_from") Date transferredAtFrom,
            @Nullable @QueryParam("transferred_at_to") Date transferredAtTo,
            @Nullable @QueryParam("created_at_from") Date createdAtFrom,
            @Nullable @QueryParam("created_at_to") Date createdAtTo,
            @Nullable @QueryParam("updated_at_from") Date updatedAtFrom,
            @Nullable @QueryParam("updated_at_to") Date updatedAtTo,
            @Nullable @QueryParam("beneficiary_id") String beneficiaryId,
            @Nullable @QueryParam("conversion_id") String conversionId,
            @Nullable @QueryParam("with_deleted") Boolean withDeleted,
            @Nullable @QueryParam("payment_group_id") String paymentGroupId,
            @Nullable @QueryParam("unique_request_id") String uniqueRequestId,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("bulk_upload_id") String bulkUploadId,
            @Nullable @QueryParam("charge_type") String chargeType,
            @Nullable @FormParam("fee_amount") BigDecimal feeAmount,
            @Nullable @FormParam("fee_currency") String feeCurrency,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Delete a Payment */
    @POST
    @Path("payments/{id}/delete")
    Payment deletePayment(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String paymentId,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Retrieve a Payment Submission*/
    @GET
    @Path("payments/{id}/submission")
    PaymentSubmission retrievePaymentSubmission(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Retrieve a Payment Confirmation */
    @GET
    @Path("payments/{id}/confirmation")
    PaymentConfirmation retrievePaymentConfirmation(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Retrieve a payments delivery date */
    @GET
    @Path("payments/payment_delivery_date")
    PaymentDeliveryDate getPaymentDeliveryDate(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("payment_date") java.sql.Date paymentDate,
            @QueryParam("payment_type") String paymentType,
            @QueryParam("currency") String currency,
            @QueryParam("bank_country") String bankCountry
    ) throws ResponseException;

    /** Gets the calculated quote for the fee that will be applied against a payment */
    @GET
    @Path("payments/quote_payment_fee")
    QuotePaymentFee getQuotePaymentFee(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_id") String accountId,
            @QueryParam("payment_currency") String paymentCurrency,
            @QueryParam("payment_destination_country") String paymentDestinationCountry,
            @QueryParam("payment_type") String paymentType,
            @Nullable @QueryParam("charge_type") String chargeType
    ) throws ResponseException;

    /** Gets the calculated quote for the fee that will be applied against a payment */
    @GET
    @Path("payments/payment_fees")
    PaymentFees getPaymentFees(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Assign payment fee table to specific sub-account */
    @POST
    @Path("payments/assign_payment_fee")
    PaymentFeeAssignment assignPaymentFee(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("payment_fee_id") String paymentFeeId,
            @FormParam("account_id") String accountId
    ) throws ResponseException;

    /** Unassign payment fee tables to specific sub-account */
    @POST
    @Path("payments/unassign_payment_fee")
    PaymentFeeUnassignment unassignPaymentFee(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("account_id") String accountId
    ) throws ResponseException;

    /** Gets the tracking info for a payment */
    @GET
    @Path("payments/{id}/tracking_info")
    PaymentTrackingInfo getPaymentTrackingInfo(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// RATES API ///////////////////////////////////////////////////

    /** Retrieve Multiple Rates */
    @GET
    @Path("rates/find")
    Rates findRates(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("currency_pair") Collection<String> currencyPair,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("ignore_invalid_pairs") Boolean ignoreInvalidPairs
    ) throws ResponseException;

    /** Detailed Rates */
    @GET
    @Path("rates/detailed")
    DetailedRate detailedRates(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("buy_currency") String buyCurrency,
            @QueryParam("sell_currency") String sellCurrency,
            @QueryParam("fixed_side") String fixedSide,
            @QueryParam("amount") BigDecimal amount,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("conversion_date") java.sql.Date conversionDate,
            @Nullable @QueryParam("conversion_date_preference") String conversionDatePreference
    ) throws ResponseException;

    ////////////////////////////////////////////////////////////////////
    ///// REPORTS API //////////////////////////////////////////////////

    /** Find Report Requests */
    @GET
    @Path("reports/report_requests/find")
    ReportRequests findReportRequests(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("short_reference") String shortReference,
            @Nullable @QueryParam("description") String description,
            @Nullable @QueryParam("created_at_from") Date createdAtFrom,
            @Nullable @QueryParam("created_at_to") Date createdAtTo,
            @Nullable @QueryParam("expiration_date_from") Date expirationDateFrom,
            @Nullable @QueryParam("expiration_date_to") Date expirationDateTo,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("report_type") String reportType,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Retrieve a Report Request */
    @GET
    @Path("reports/report_requests/{id}")
    ReportRequest retrieveReportRequests(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Generate Conversion Report */
    @POST
    @Path("reports/conversions/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    ConversionReport createConversionReport(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("description") String description,
            @Nullable @FormParam("buy_currency") String buyCurrency,
            @Nullable @FormParam("sell_currency") String sellCurrency,
            @Nullable @FormParam("client_buy_amount_from") BigDecimal clientBuyAmountFrom,
            @Nullable @FormParam("client_buy_amount_to") BigDecimal clientBuyAmountTo,
            @Nullable @FormParam("client_sell_amount_from") BigDecimal clientSellAmountFrom,
            @Nullable @FormParam("client_Sell_amount_to") BigDecimal clientSellAmountTo,
            @Nullable @FormParam("partner_buy_amount_from") BigDecimal partnerBuyAmountFrom,
            @Nullable @FormParam("partner_buy_amount_to") BigDecimal partnerBuyAmountTo,
            @Nullable @FormParam("partner_sell_amount_from") BigDecimal partnerSellAmountFrom,
            @Nullable @FormParam("partner_Sell_amount_to") BigDecimal partnerSellAmountTo,
            @Nullable @FormParam("client_status") String clientStatus,
            @Nullable @FormParam("conversion_date_from") Date conversionDateFrom,
            @Nullable @FormParam("conversion_date_to") Date conversionDateTo,
            @Nullable @FormParam("settlement_date_from") Date settlementDateFrom,
            @Nullable @FormParam("settlement_date_to") Date settlementDateTo,
            @Nullable @FormParam("created_at_from") Date createdAtFrom,
            @Nullable @FormParam("created_at_to") Date createdAtTo,
            @Nullable @FormParam("updated_at_from") Date updatedAtFrom,
            @Nullable @FormParam("updated_at_to") Date updatedAtTo,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId,
            @Nullable @FormParam("scope") String scope
    ) throws ResponseException;

    /** Generate Payment Report */
    @POST
    @Path("reports/payments/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    PaymentReport createPaymentReport(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @FormParam("on_behalf_of") String onBehalfOf,
            @Nullable @FormParam("description") String description,
            @Nullable @FormParam("currency") String currency,
            @Nullable @FormParam("amount_from") BigDecimal amountFrom,
            @Nullable @FormParam("amount_to") BigDecimal amountTo,
            @Nullable @FormParam("status") String status,
            @Nullable @FormParam("payment_date_from") Date paymentDateFrom,
            @Nullable @FormParam("payment_date_to") Date paymentDateTo,
            @Nullable @FormParam("transferred_at_from") Date transferredAtFrom,
            @Nullable @FormParam("transferred_at_to") Date transferredAtTo,
            @Nullable @FormParam("created_at_from") Date createdAtFrom,
            @Nullable @FormParam("created_at_to") Date createdAtTo,
            @Nullable @FormParam("updated_at_from") Date updatedAtFrom,
            @Nullable @FormParam("updated_at_to") Date updatedAtTo,
            @Nullable @FormParam("beneficiary_id") String beneficiaryId,
            @Nullable @FormParam("conversion_id") String conversionId,
            @Nullable @FormParam("with_deleted") Boolean withDeleted,
            @Nullable @FormParam("payment_group_id") String paymentGroupId,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId,
            @Nullable @FormParam("scope") String scope
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// REFERENCE API ///////////////////////////////////////////////

    /** Bank Details */
    @GET
    @Path("reference/bank_details")
    BankDetails bankDetails(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("identifier_type") String identifierType,
            @QueryParam("identifier_value") String identifierValue
    ) throws ResponseException;

    /** Beneficiary Required Details */
    @GET
    @Path("reference/beneficiary_required_details")
    BeneficiaryRequiredDetails beneficiaryRequiredDetails(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("bank_account_country") String bankAccountCountry,
            @Nullable @QueryParam("beneficiary_country") String beneficiaryCountry
    ) throws ResponseException;

    /** Available Currencies */
    @GET
    @Path("reference/currencies")
    Currencies currencies(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent
    ) throws ResponseException;

    /** Conversion Dates */
    @GET
    @Path("reference/conversion_dates")
    ConversionDates conversionDates(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("conversion_pair") String conversionPair,
            @Nullable @QueryParam("start_date") Date startDate,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Payment Dates */
    @GET
    @Path("reference/payment_dates")
    PaymentDates paymentDates(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("currency") String currency,
            @Nullable @QueryParam("start_date") Date startDate
    ) throws ResponseException;

    /** Settlement Accounts */
    @GET
    @Path("reference/settlement_accounts")
    SettlementAccounts settlementAccounts(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("account_id") String accountId
    ) throws ResponseException;

    /** Payer Required Details */
    @GET
    @Path("reference/payer_required_details")
    PayerRequiredDetails payerRequiredDetails(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("payer_country") String payerCountry,
            @Nullable @QueryParam("payer_entity_type") String payerEntityType,
            @Nullable @QueryParam("payment_type") String paymentType
    ) throws ResponseException;

    /** Payment Purpose Codes */
    @GET
    @Path("reference/payment_purpose_codes")
    PaymentPurposeCodes paymentPurposeCodes(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @QueryParam("currency") String currency,
            @QueryParam("bank_account_country") String bankAccountCountry,
            @Nullable @QueryParam("entity_type") String entityType
    ) throws ResponseException;

    /** Payment Fee Rules */
    @GET
    @Path("reference/payment_fee_rules")
    PaymentFeeRules paymentFeeRules(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_id") String accountId,
            @Nullable @QueryParam("payment_type") String paymentType,
            @Nullable @QueryParam("charge_type") String chargeType
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// SENDER API //////////////////////////////////////////////////

    /** Retrieve Sender Details */
    @GET
    @Path("transactions/sender/{id}")
    SenderDetails retrieveSenderDetails(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// TRANSACTIONS API ////////////////////////////////////////////
    /** Retrieve a Transaction */
    @GET
    @Path("transactions/{id}")
    Transaction retrieveTransaction(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Find Transactions */
    @GET
    @Path("transactions/find")
    Transactions findTransactions(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("amount") BigDecimal amount,
            @Nullable @QueryParam("amount_from") BigDecimal amountFrom,
            @Nullable @QueryParam("amount_to") BigDecimal amountTo,
            @Nullable @QueryParam("action") String action,
            @Nullable @QueryParam("related_entity_type") String relatedEntityType,
            @Nullable @QueryParam("related_entity_id") String relatedEntityId,
            @Nullable @QueryParam("related_entity_short_reference") String relatedEntityShortReference,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("type") String type,
            @Nullable @QueryParam("reason") String reason,
            @Nullable @QueryParam("settles_at_from") java.sql.Date settlesAtFrom,
            @Nullable @QueryParam("settles_at_to") java.sql.Date settlesAtTo,
            @Nullable @QueryParam("created_at_from") java.sql.Date createdAtFrom,
            @Nullable @QueryParam("created_at_to") java.sql.Date createdAtTo,
            @Nullable @QueryParam("updated_at_from") java.sql.Date updatedAtFrom,
            @Nullable @QueryParam("updated_at_to") java.sql.Date updatedAtTo,
            @Nullable @QueryParam("completed_at_from") java.sql.Date completedAtFrom,
            @Nullable @QueryParam("completed_at_to") java.sql.Date completedAtTo,
            @Nullable @QueryParam("beneficiary_id") String beneficiaryId,
            @Nullable @QueryParam("currency_pair") String currencyPair,
            @Nullable @QueryParam("scope") String scope,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    ///////////////////////////////////////////////////////////////////
    ///// TRANSFERS API ////////////////////////////////////////////
    /** Retrieve a Transfer */
    @GET
    @Path("transfers/{id}")
    Transfer retrieveTransfer(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf
    ) throws ResponseException;

    /** Find Transfers */
    @GET
    @Path("transfers/find")
    Transfers findTransfers(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("on_behalf_of") String onBehalfOf,
            @Nullable @QueryParam("short_reference") String shortReference,
            @Nullable @QueryParam("source_account_id") String sourceAccountId,
            @Nullable @QueryParam("destination_account_id") String destinationAccountId,
            @Nullable @QueryParam("status") String status,
            @Nullable @QueryParam("currency") String currency,
            @Nullable @QueryParam("amount_from") BigDecimal amountFrom,
            @Nullable @QueryParam("amount_to") BigDecimal amountTo,
            @Nullable @QueryParam("created_at_from") Date createdAtFrom,
            @Nullable @QueryParam("created_at_to") Date createdAtTo,
            @Nullable @QueryParam("updated_at_from") Date updatedAtFrom,
            @Nullable @QueryParam("updated_at_to") Date updatedAtTo,
            @Nullable @QueryParam("completed_at_from") Date completedAtFrom,
            @Nullable @QueryParam("completed_at_to") Date completedAtTo,
            @Nullable @QueryParam("creator_contact_id") String creatorContactId,
            @Nullable @QueryParam("creator_account_id") String creatorAccountId,
            @Nullable @QueryParam("unique_request_id") String uniqueRequestId,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    @POST
    @Path("transfers/create")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    Transfer createTransfer(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @FormParam("source_account_id") String sourceAccountId,
            @FormParam("destination_account_id") String destinationAccountId,
            @FormParam("currency") String currency,
            @FormParam("amount") BigDecimal amount,
            @Nullable @FormParam("reason") String reason,
            @Nullable @FormParam("unique_request_id") String uniqueRequestId
    ) throws ResponseException;

    /** Cancel a Transfer */
    @POST
    @Path("transfers/{id}/cancel")
    Transfer cancelTransfer(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("id") String id
    ) throws ResponseException;

    //////////////////////////////////////////////////////////////////
    ///// WithdrawalAccounts /////////////////////////////////////////

    /** Find Withdrawal Accounts */
    @GET
    @Path("withdrawal_accounts/find")
    WithdrawalAccounts findWithdrawalAccounts(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @Nullable @QueryParam("account_id") String accountId,
            @Nullable @QueryParam("page") Integer page,
            @Nullable @QueryParam("per_page") Integer perPage,
            @Nullable @QueryParam("order") String order,
            @Nullable @QueryParam("order_asc_desc") Pagination.SortOrder orderAscDesc
    ) throws ResponseException;

    /** Pull Funds From Withdrawal Accounts */
    @POST
    @Path("withdrawal_accounts/{withdrawalAccountId}/pull_funds")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    WithdrawalAccountFunds withdrawalAccountsPullFunds(
            @HeaderParam("X-Auth-Token") String authToken,
            @HeaderParam("User-Agent") String userAgent,
            @PathParam("withdrawalAccountId") String withdrawalAccountId,
            @FormParam("reference") String reference,
            @FormParam("amount") BigDecimal amount
    ) throws ResponseException;

}


text:
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
  xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">

  <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">

    <!-- provider is unspecified to make resolution more failure-tolerant -->
    <!-- <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> -->

    <!-- converter classes -->
    <class>org.opentosca.container.core.common.jpa.CsarIdConverter</class>
    <class>org.opentosca.container.core.common.jpa.DocumentConverter</class>
    <class>org.opentosca.container.core.common.jpa.PathConverter</class>
    <class>org.opentosca.container.core.common.jpa.QNameConverter</class>
    <class>org.opentosca.container.core.common.jpa.UriConverter</class>

    <!-- entities -->
    <class>org.opentosca.container.core.next.model.PersistenceObject</class>
    <class>org.opentosca.container.core.next.model.Endpoint</class>
    <class>org.opentosca.container.core.next.model.Capability</class>
    <class>org.opentosca.container.core.next.model.Property</class>
    <class>org.opentosca.container.core.next.model.ServiceTemplateInstance</class>
    <class>org.opentosca.container.core.next.model.ServiceTemplateInstanceProperty</class>
    <class>org.opentosca.container.core.next.model.NodeTemplateInstance</class>
    <class>org.opentosca.container.core.next.model.NodeTemplateInstanceProperty</class>
    <class>org.opentosca.container.core.next.model.RelationshipTemplateInstance</class>
    <class>org.opentosca.container.core.next.model.RelationshipTemplateInstanceProperty</class>
    <class>org.opentosca.container.core.next.model.PlanInstance</class>
    <class>org.opentosca.container.core.next.model.PlanInstanceEvent</class>
    <class>org.opentosca.container.core.next.model.PlanInstanceOutput</class>
    <class>org.opentosca.container.core.next.model.PlanInstanceInput</class>

    <class>org.opentosca.container.core.next.model.DeploymentTest</class>
    <class>org.opentosca.container.core.next.model.DeploymentTestResult</class>

    <class>org.opentosca.container.core.next.model.Situation</class>
    <class>org.opentosca.container.core.next.model.SituationTrigger</class>
    <class>org.opentosca.container.core.next.model.SituationTriggerProperty</class>
    <class>org.opentosca.container.core.next.model.SituationTriggerInstance</class>
    <class>org.opentosca.container.core.next.model.SituationTriggerInstanceProperty</class>
    <class>org.opentosca.container.core.next.model.SituationsMonitor</class>
    <class>org.opentosca.container.core.next.model.SituationsMonitorIdCollection</class>

    <class>org.opentosca.container.core.next.model.IADeploymentInfo</class>
    <class>org.opentosca.container.core.next.model.PlanDeploymentInfo</class>
    <class>org.opentosca.container.core.next.model.DeploymentProcessInfo</class>
    <class>org.opentosca.container.core.model.deployment.AbstractDeploymentInfo</class>
    <class>org.opentosca.container.core.model.deployment.AbstractFileDeploymentInfo</class>

    <class>org.opentosca.container.core.next.model.Capability</class>

    <exclude-unlisted-classes>true</exclude-unlisted-classes>

    <properties>
      <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
      <property name="hibernate.hbm2ddl.auto" value="update" />
      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
      <property name="hibernate.globally_quoted_identifiers" value="true" />
    </properties>

  </persistence-unit>

</persistence>

redpajama_set_name: RedPajamaGithub


text:
cask :v1 => 'keyboard-maestro' do
  version '7.0.1'
  sha256 '5f0f104fc164c53be6ee258db2d5a62e2448493789a80e398593144f9ca0900d'

  # stairways.com is the official download host per the vendor homepage
  url "http://files.stairways.com/keyboardmaestro-#{version.delete('.')}.zip"
  name 'Keyboard Maestro'
  homepage 'http://www.keyboardmaestro.com/'
  license :commercial

  depends_on :macos => '>= :yosemite'

  app 'Keyboard Maestro.app'
end


text:
Results for {{searchTerm.value.$}}

Collections

 1" ng-click="openCollection(collection.tagLabel);">

{{collection.tagLabel}}

{{collection.photos.length}} photos


text:
'use strict';

var fs = require('fs');
var path = require('path');
var home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;

var gitconfig = path.join(home, '.gitconfig');

if (!fs.existsSync(gitconfig)) {
  gitconfig = path.join(home, '.config/git/config');
  if (!fs.existsSync(gitconfig)) {
    gitconfig = null;
  }
}

module.exports = gitconfig;


text:
package ch.uzh.ddis.katts.query.processor.aggregate.component;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import ch.uzh.ddis.katts.bolts.aggregate.component.AvgPartitionerComponent;

/**
 * This class indicates that the aggregation function is configured as a max aggregation.
 *
 * @author Thomas Hunziker
 *
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class AvgPartitioner extends AvgPartitionerComponent implements Serializable {

	private static final long serialVersionUID = 1L;

}


text:
package net.morimekta.providence.reflect.contained;

import net.morimekta.providence.PMessage;
import net.morimekta.providence.PMessageBuilder;
import net.morimekta.providence.PType;
import net.morimekta.providence.PUnion;
import net.morimekta.providence.descriptor.PMessageDescriptor;
import net.morimekta.providence.descriptor.PUnionDescriptor;
import net.morimekta.providence.util.ThriftAnnotation;
import net.morimekta.providence.util.ThriftContainer;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.ImmutableSortedSet;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

/**
 * @author Stein Eldar Johnsen
 * @since 07.09.15
 */
public class CUnion implements PUnion<CUnion,CField> {
    private final CUnionDescriptor descriptor;
    private final CField           unionField;
    private final Object           unionValue;

    private CUnion(Builder builder) {
        this.unionField = builder.unionField;
        this.descriptor = builder.descriptor;

        if (builder.currentValue instanceof PMessageBuilder) {
            this.unionValue = ((PMessageBuilder) builder.currentValue).build();
        } else if (builder.currentValue instanceof List) {
            this.unionValue = ImmutableList.copyOf((List) builder.currentValue);
        } else if (builder.currentValue instanceof Map) {
            switch (ThriftContainer.forName(unionField.getAnnotationValue(ThriftAnnotation.CONTAINER))) {
                case SORTED:
                    this.unionValue = ImmutableSortedMap.copyOf((Map) builder.currentValue);
                    break;
                default:
                    this.unionValue = ImmutableMap.copyOf((Map) builder.currentValue);
                    break;
            }
        } else if (builder.currentValue instanceof Set) {
            switch (ThriftContainer.forName(unionField.getAnnotationValue(ThriftAnnotation.CONTAINER))) {
                case SORTED:
                    this.unionValue = ImmutableSortedSet.copyOf((Set) builder.currentValue);
                    break;
                default:
                    this.unionValue = ImmutableSet.copyOf((Set) builder.currentValue);
                    break;
            }
        } else {
            this.unionValue = builder.currentValue;
        }
    }

    @Override
    public boolean has(int key) {
        return unionField != null && unionField.getId() == key && unionValue != null;
    }

    @Override
    @SuppressWarnings("unchecked")
    public <T> T get(int key) {
        return has(key) ? (T) unionValue : null;
    }

    @Nonnull
    @Override
    public PMessageBuilder<CUnion,CField> mutate() {
        return new Builder(descriptor).merge(this);
    }

    @Nonnull
    @Override
    public String asString() {
        return CStruct.asString(this);
    }

    @Override
    public String toString() {
        return descriptor.getQualifiedName() + asString();
    }

    @Nonnull
    @Override
    public CUnionDescriptor descriptor() {
        return descriptor;
    }

    @Override
    public boolean unionFieldIsSet() {
        return unionField != null;
    }

    @Nonnull
    @Override
    public CField unionField() {
        if (unionField == null) throw new IllegalStateException("No union field set in " + descriptor.getQualifiedName());
        return unionField;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || !(o instanceof CUnion)) {
            return false;
        }

        CUnion other = (CUnion) o;
        return Objects.equals(descriptor, other.descriptor) &&
               Objects.equals(unionField, other.unionField) &&
               Objects.equals(unionValue, other.unionValue);
    }

    @Override
    public int hashCode() {
        return Objects.hash(descriptor().getQualifiedName(), unionField, unionValue);
    }

    @Override
    public int compareTo(@Nonnull CUnion other) {
        return CStruct.compareMessages(this, other);
    }

    public static class Builder extends PMessageBuilder<CUnion,CField> {
        private final CUnionDescriptor descriptor;

        private CField unionField;
        private Object currentValue;

        public Builder(CUnionDescriptor descriptor) {
            this.descriptor = descriptor;
        }

        @Nonnull
        @Override
        @SuppressWarnings("unchecked")
        public PMessageBuilder mutator(int key) {
            CField field = descriptor.findFieldById(key);
            if (field == null) {
                throw new IllegalArgumentException("No such field ID " + key);
            } else if (field.getType() != PType.MESSAGE) {
                throw new IllegalArgumentException("Not a message field ID " + key + ": " + field.getName());
            }
            if (unionField != field) {
                unionField = field;
                currentValue = null;
            }

            if (currentValue == null) {
                currentValue = ((PMessageDescriptor) field.getDescriptor()).builder();
            } else if (currentValue instanceof PMessage) {
                currentValue = ((PMessage) currentValue).mutate();
            } else if (!(currentValue instanceof PMessageBuilder)) {
                // This should in theory not be possible. This is just a safe-guard.
                throw new IllegalArgumentException("Invalid currentValue in map on message type: " + currentValue.getClass().getSimpleName());
            }

            return (PMessageBuilder) currentValue;
        }

        @Nonnull
        @Override
        @SuppressWarnings("unchecked")
        public Builder merge(@Nonnull CUnion from) {
            if (unionField == null || unionField != from.unionField) {
                set(from.unionField.getId(), from.get(from.unionField.getId()));
            } else {
                int key = unionField.getId();
                switch (unionField.getType()) {
                    case MESSAGE: {
                        PMessageBuilder src;
                        if (currentValue instanceof PMessageBuilder) {
                            src = (PMessageBuilder) currentValue;
                        } else {
                            src = ((PMessage) currentValue).mutate();
                        }
                        PMessage toMerge = from.get(key);

                        currentValue = src.merge(toMerge);
                        break;
                    }
                    case SET:
                        ((Set<Object>) currentValue).addAll(from.get(key));
                        break;
                    case MAP:
                        ((Map<Object, Object>) currentValue).putAll(from.get(key));
                        break;
                    default:
                        set(key, from.get(key));
                        break;
                }
            }

            return this;
        }

        @Nonnull
        @Override
        public PUnionDescriptor<CUnion, CField> descriptor() {
            return descriptor;
        }

        @Nonnull
        @Override
        public CUnion build() {
            return new CUnion(this);
        }

        @Override
        public boolean valid() {
            return unionField != null && currentValue != null;
        }

        @Override
        public void validate() {
            if (!valid()) {
                throw new IllegalStateException("No union field set in " +
                                                descriptor().getQualifiedName());
            }
        }

        @Nonnull
        @Override
        @SuppressWarnings("unchecked")
        public Builder set(int key, Object value) {
            CField field = descriptor.findFieldById(key);
            if (field == null) {
                return this; // soft ignoring unsupported fields.
            }
            if (value == null) {
                return clear(key);
            }
            this.unionField = field;
            switch (field.getType()) {
                case SET:
                    this.currentValue = new LinkedHashSet<>((Collection) value);
                    break;
                case LIST:
                    this.currentValue = new ArrayList<>((Collection) value);
                    break;
                case MAP:
                    this.currentValue = new LinkedHashMap<>((Map) value);
                    break;
                default:
                    this.currentValue = value;
                    break;
            }

            return this;
        }

        @Override
        public boolean isSet(int key) {
            return unionField != null && unionField.getId() == key;
        }

        @Override
        public boolean isModified(int key) {
            return false;
        }

        @Nonnull
        @Override
        @SuppressWarnings("unchecked")
        public Builder addTo(int key, Object value) {
            CField field = descriptor.findFieldById(key);
            if (field == null) {
                return this; // soft ignoring unsupported fields.
            }
            if (field.getType() != PType.LIST &&
                field.getType() != PType.SET) {
                throw new IllegalArgumentException("Unable to accept addTo on non-list field " + field.getName());
            }
            if (value == null) {
                throw new IllegalArgumentException("Adding null item to collection " + field.getName());
            }
            if (this.unionField != field || this.currentValue == null) {
                this.unionField = field;
                switch (field.getType()) {
                    case LIST: {
                        this.currentValue = new ArrayList<>();
                        break;
                    }
                    case SET: {
                        this.currentValue = new LinkedHashSet<>();
                        break;
                    }
                    default:
                        break;
                }
            }
            ((Collection<Object>) this.currentValue).add(value);
            return this;
        }

        @Nonnull
        @Override
        public Builder clear(int key) {
            if (isSet(key)) {
                this.unionField = null;
                this.currentValue = null;
            }
            return this;
        }
    }
}


text:
import test from "ava";
import data from "../../v5.0";

test("Expected data", t => {
  t.snapshot(data);
});


text:
package org.apache.ambari.server.view;

import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;

import java.io.File;
import java.net.URL;

import org.apache.ambari.server.view.configuration.ViewConfig;
import org.junit.Test;

import junit.framework.Assert;

/**
 * ViewClassLoader test.
 */
public class ViewClassLoaderTest {

  @Test
  public void testGetResource() throws Exception {
    ClassLoader parentClassLoader = createMock(ClassLoader.class);
    URL parentResource = new File("parent-resource").toURI().toURL();
    ViewConfig viewConfig = createNiceMock(ViewConfig.class);

    expect(parentClassLoader.getResource("parent-resource")).andReturn(parentResource).once();

    replay(parentClassLoader, viewConfig);

    File file = new File("./src/test/resources");
    URL testURL = file.toURI().toURL();

    URL[] urls = new URL[]{testURL};

    ViewClassLoader classLoader = new ViewClassLoader(viewConfig, parentClassLoader, urls);

    URL url = classLoader.getResource("ambari.properties");

    Assert.assertNotNull(url);

    url = classLoader.getResource("parent-resource");

    Assert.assertNotNull(url);
    Assert.assertSame(parentResource, url);

    verify(parentClassLoader, viewConfig);
  }

  @Test
  public void testLoadClass() throws Exception {
    TestClassLoader parentClassLoader = createMock(TestClassLoader.class);
    Class parentClass = Object.class;
    ViewConfig viewConfig = createNiceMock(ViewConfig.class);

    expect(parentClassLoader.getPackage("org.apache.ambari.server.view")).andReturn(null).anyTimes();
    expect(parentClassLoader.loadClass("java.lang.Object")).andReturn(parentClass).anyTimes();
    expect(parentClassLoader.loadClass("ParentClass")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("org.apache.ambari.server.controller.spi.ResourceProvider")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("org.apache.ambari.view.ViewContext")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("javax.xml.parsers.SAXParserFactory")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("com.google.inject.AbstractModule")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("org.slf4j.LoggerFactory")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("com.sun.jersey.api.ConflictException")).andReturn(parentClass).once();
    expect(parentClassLoader.loadClass("org.apache.velocity.VelocityContext")).andReturn(parentClass).once();

    replay(parentClassLoader, viewConfig);

    File file = new File("./target/test-classes");
    URL testURL = file.toURI().toURL();

    URL[] urls = new URL[]{testURL};

    ViewClassLoader classLoader = new ViewClassLoader(viewConfig, parentClassLoader, urls);

    // should be loaded by parent loader
    Class clazz = classLoader.loadClass("ParentClass");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("org.apache.ambari.server.controller.spi.ResourceProvider");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("org.apache.ambari.view.ViewContext");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("javax.xml.parsers.SAXParserFactory");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("com.google.inject.AbstractModule");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("org.slf4j.LoggerFactory");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("com.sun.jersey.api.ConflictException");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    clazz = classLoader.loadClass("org.apache.velocity.VelocityContext");

    Assert.assertNotNull(clazz);
    Assert.assertSame(parentClass, clazz);

    verify(parentClassLoader, viewConfig);
  }

  public class TestClassLoader extends ClassLoader {
    @Override
    public Package getPackage(String s) {
      return super.getPackage(s);
    }
  }
}


text:
package com.intellij.dupLocator;

import consulo.logging.Logger;
import javax.annotation.Nonnull;

/**
 * @author Eugene.Kudelevsky
 */
public class DefaultDuplocatorState implements ExternalizableDuplocatorState {
  private static final Logger LOG = Logger.getInstance(DefaultDuplocatorState.class);

  public boolean DISTINGUISH_VARIABLES = false;
  public boolean DISTINGUISH_FUNCTIONS = true;
  public boolean DISTINGUISH_LITERALS = true;
  public int LOWER_BOUND = 10;
  public int DISCARD_COST = 0;

  @Override
  public boolean distinguishRole(@Nonnull PsiElementRole role) {
    switch (role) {
      case VARIABLE_NAME:
        return DISTINGUISH_VARIABLES;

      case FIELD_NAME:
        return DISTINGUISH_VARIABLES;

      case FUNCTION_NAME:
        return DISTINGUISH_FUNCTIONS;

      default:
        LOG.error("Unknown role " + role);
        return true;
    }
  }

  @Override
  public boolean distinguishLiterals() {
    return DISTINGUISH_LITERALS;
  }

  @Override
  public int getLowerBound() {
    return LOWER_BOUND;
  }

  @Override
  public int getDiscardCost() {
    return DISCARD_COST;
  }
}


text:
package main

import (
	"flag"
	"fmt"
	"os"

	"github.com/NavigatingCancer/mirth-api/mirthagent"
	"github.com/NavigatingCancer/mirth-api/mirthagent/errors"
	"github.com/caimeo/console"
	"github.com/caimeo/iniflags"
)

var remoteServer = flag.String("server", "localhost", "The remote server name")
var remotePort = flag.String("port", "40443", "The remote server port")
var remoteAPIVersion = flag.String("api_version", "3.5.0", "The remote Mirth server API version")
var remoteUsername = flag.String("username", "", "The remote user name")
var remotePassword = flag.String("password", "", "The remote password")
var tlsVerify = flag.Bool("tls", true, "Is TLS verfify on")
var verboseMode = flag.Bool("verbose", false, "Verbose console output.")
var debugMode = flag.Bool("debug", false, "Debug console output.")

var con *console.Console

func main() {
	iniflags.SetConfigFile(".settings")
	iniflags.SetAllowMissingConfigFile(true)
	iniflags.Parse()

	//setup output
	go monitorErrors(errors.CommonErrorChannel())
	con := console.Init(*verboseMode, *debugMode)
	errors.Console = con
	con.Always("Mirth API")

	//setup MirthAgent
	mirthagent.TLSVerify = *tlsVerify
	a := mirthagent.New(*remoteServer, *remotePort, *remoteAPIVersion)

	//get the current status
	_, _, isRestoreable := a.LoginStatus()

	isConnected := false

	if isRestoreable {
		connectCh, _ := a.Connect()
		isConnected, _ = <-connectCh
	}

	if isConnected {
		con.Verbose("Connection Restored: ", isConnected)
	} else {
		if len(*remoteUsername) > 0 && len(*remotePassword) > 0 {
			loginCh, _ := a.Login(*remoteUsername, *remotePassword)
			isConnected, _ = <-loginCh
			if isConnected {
				con.Verbose("Connection New: ", isConnected)
			}
		} else {
			con.Always("Cannot connect, user name and password required.")
			os.Exit(1)
		}
	}

	if isConnected {
		con.Verbose("Ready")
		con.Debug(a.LoginStatus())
	} else {
		con.Always("Cannot connect")
		os.Exit(2)
	}

	rc, _ := a.API.Server.ResourcesList()

	r := <-rc

	//	cg := model.ChannelGroup{Versionø: "3.5.0", Idø: "b49f7831-d524-4a02-bb8c-61db3921166b", Nameø: "TEST Name", Descriptionø: "This is the description"}

	//	c1 := model.ChannelGroupChannel{Versionø: "3.5.0", Idø: "abc"}
	//	c2 := model.ChannelGroupChannel{Versionø: "3.5.0", Idø: "xyz"}

	//	cg.AppendChannel(c1)
	//	cg.AppendChannel(c2)
	//	cg.SetName("A different name")

	//	cg.SetChannels(append(cg.Channels(), c2))

	//	console.Always(cg)

	//x, _ := xml.Marshal(cg)
	console.Always(len(r))

	x := r[0].Id
	console.Always("- - - - -")
	console.Always(string(x))
	console.Always("---------")

	fc, _ := a.API.Server.SetDefaultResourceDirectory("/mnt/mirth/data/java")

	f := <-fc

	console.Always("xxx- - - - -")
	console.Always(f)
	console.Always("---------")

	//	time.Sleep(5 * time.Second)

}

func monitorErrors(e chan error) {
	for err := range e {
		x, ok := interface{}(err).(errors.ExtendedError)
		if ok {
			fmt.Fprintln(os.Stderr, "EXTENDED ERROR\n", err, "\n", x.Cause())
		} else {
			fmt.Fprintln(os.Stderr, "ERROR\n", err)
		}
	}
}


text:
'use strict';

angular.module('web')
    .service('Users', ['$q', '$http', 'Storage', 'BASE_URL', function ($q, $http, Storage, BASE_URL) {
        var url = BASE_URL + "rest/user";
        var storageKey = '_users';

        var getUsers = function () {
            var deferred = $q.defer();
            $http({
                url: url,
                method: 'GET'
            }).then(function (result) {
                deferred.resolve(result.data);
            },function (e) {
                deferred.reject(e);
            });
            return deferred.promise;
        };

        var add = function (user) {
            var deferred = $q.defer();
            $http({
                url: url,
                method: 'POST',
                data: user
            }).then(function (result) {
                deferred.resolve(result.data);
            },function (e) {
                deferred.reject(e);
            });
            return deferred.promise;
        };

        var updateUser = function (user) {
            return $http({
                url: url,
                method: 'PUT',
                data: user
            })
        };

        var getCurrentUser = function () {
            return Storage.get('currentUser')
        };

        var refreshCurrentUser = function () {
            var deferred = $q.defer();
            $http({
                url: url + "/currentUser",
                method: 'GET'
            }).then(function (result) {
                if (result.data.email) {
                    Storage.save('currentUser', result.data);
                }
                deferred.resolve(result);
            }, function (e) {
                deferred.reject(e);
            });
            return deferred.promise;
        };

        var remove = function (email) {
            return $http({
                url: url + "/" + email,
                method: 'DELETE'
            })
        };

        return {
            insert: function (user) {
                return add(user);
            },

            delete: function (email) {
                return remove(email);
            },

            update: function (user) {
                return updateUser(user);
            },

            getCurrent: function () {
                return getCurrentUser();
            },

            refreshCurrent: function () {
                return refreshCurrentUser();
            },

            getAll: function () {
                return getUsers().then(function (data) {
                    return data;
                })
            }
        }
    }]);


text:
Repository moved!
===============

I have moved this repository to:
http://git.minnecker.com/public/projects/opensource/Heise-Webpresentation

It's still public and OpenSource!


text:
package me.liaoheng.starth.github.data.net;

import me.liaoheng.starth.github.model.AccessToken;
import me.liaoheng.starth.github.model.RequestToken;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

/**
 * @author liaoheng
 * @version 2016-06-24 20:38
 */
public interface OAuthService {

    @Headers("Accept: application/json")
    @POST("https://github.com/login/oauth/access_token") Observable<AccessToken> getToken(
            @Body RequestToken requestToken);
}