text:
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/pm.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/pcieport_if.h>
#include <linux/slab.h>

#include "aerdrv.h"
#include "../../pci.h"

/*
 * Version Information
 */
#define DRIVER_VERSION "v1.0"
#define DRIVER_AUTHOR "tom.l.nguyen@intel.com"
#define DRIVER_DESC "Root Port Advanced Error Reporting Driver"
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");

static int aer_probe(struct pcie_device *dev);
static void aer_remove(struct pcie_device *dev);
static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
	enum pci_channel_state error);
static void aer_error_resume(struct pci_dev *dev);
static pci_ers_result_t aer_root_reset(struct pci_dev *dev);

static const struct pci_error_handlers aer_error_handlers = {
	.error_detected = aer_error_detected,
	.resume		= aer_error_resume,
};

static struct pcie_port_service_driver aerdriver = {
	.name		= "aer",
	.port_type	= PCI_EXP_TYPE_ROOT_PORT,
	.service	= PCIE_PORT_SERVICE_AER,

	.probe		= aer_probe,
	.remove		= aer_remove,

	.err_handler	= &aer_error_handlers,

	.reset_link	= aer_root_reset,
};

static int pcie_aer_disable;

void pci_no_aer(void)
{
	pcie_aer_disable = 1;	/* has priority over 'forceload' */
}

bool pci_aer_available(void)
{
	return !pcie_aer_disable && pci_msi_enabled();
}

static int set_device_error_reporting(struct pci_dev *dev, void *data)
{
	bool enable = *((bool *)data);
	int type = pci_pcie_type(dev);

	if ((type == PCI_EXP_TYPE_ROOT_PORT) ||
	    (type == PCI_EXP_TYPE_UPSTREAM) ||
	    (type == PCI_EXP_TYPE_DOWNSTREAM)) {
		if (enable)
			pci_enable_pcie_error_reporting(dev);
		else
			pci_disable_pcie_error_reporting(dev);
	}

	if (enable)
		pcie_set_ecrc_checking(dev);

	return 0;
}

/**
 * set_downstream_devices_error_reporting - enable/disable the error reporting  bits on the root port and its downstream ports.
 * @dev: pointer to root port's pci_dev data structure
 * @enable: true = enable error reporting, false = disable error reporting.
 */
static void set_downstream_devices_error_reporting(struct pci_dev *dev,
						   bool enable)
{
	set_device_error_reporting(dev, &enable);

	if (!dev->subordinate)
		return;
	pci_walk_bus(dev->subordinate, set_device_error_reporting, &enable);
}

/**
 * aer_enable_rootport - enable Root Port's interrupts when receiving messages
 * @rpc: pointer to a Root Port data structure
 *
 * Invoked when PCIe bus loads AER service driver.
 */
static void aer_enable_rootport(struct aer_rpc *rpc)
{
	struct pci_dev *pdev = rpc->rpd->port;
	int aer_pos;
	u16 reg16;
	u32 reg32;

	/* Clear PCIe Capability's Device Status */
	pcie_capability_read_word(pdev, PCI_EXP_DEVSTA, &reg16);
	pcie_capability_write_word(pdev, PCI_EXP_DEVSTA, reg16);

	/* Disable system error generation in response to error messages */
	pcie_capability_clear_word(pdev, PCI_EXP_RTCTL,
				   SYSTEM_ERROR_INTR_ON_MESG_MASK);

	aer_pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
	/* Clear error status */
	pci_read_config_dword(pdev, aer_pos + PCI_ERR_ROOT_STATUS, &reg32);
	pci_write_config_dword(pdev, aer_pos + PCI_ERR_ROOT_STATUS, reg32);
	pci_read_config_dword(pdev, aer_pos + PCI_ERR_COR_STATUS, &reg32);
	pci_write_config_dword(pdev, aer_pos + PCI_ERR_COR_STATUS, reg32);
	pci_read_config_dword(pdev, aer_pos + PCI_ERR_UNCOR_STATUS, &reg32);
	pci_write_config_dword(pdev, aer_pos + PCI_ERR_UNCOR_STATUS, reg32);

	/*
	 * Enable error reporting for the root port device and downstream port
	 * devices.
	 */
	set_downstream_devices_error_reporting(pdev, true);

	/* Enable Root Port's interrupt in response to error messages */
	pci_read_config_dword(pdev, aer_pos + PCI_ERR_ROOT_COMMAND, &reg32);
	reg32 |= ROOT_PORT_INTR_ON_MESG_MASK;
	pci_write_config_dword(pdev, aer_pos + PCI_ERR_ROOT_COMMAND, reg32);
}

/**
 * aer_disable_rootport - disable Root Port's interrupts when receiving messages
 * @rpc: pointer to a Root Port data structure
 *
 * Invoked when PCIe bus unloads AER service driver.
 */
static void aer_disable_rootport(struct aer_rpc *rpc)
{
	struct pci_dev *pdev = rpc->rpd->port;
	u32 reg32;
	int pos;

	/*
	 * Disable error reporting for the root port device and downstream port
	 * devices.
	 */
	set_downstream_devices_error_reporting(pdev, false);

	pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
	/* Disable Root's interrupt in response to error messages */
	pci_read_config_dword(pdev, pos + PCI_ERR_ROOT_COMMAND, &reg32);
	reg32 &= ~ROOT_PORT_INTR_ON_MESG_MASK;
	pci_write_config_dword(pdev, pos + PCI_ERR_ROOT_COMMAND, reg32);

	/* Clear Root's error status reg */
	pci_read_config_dword(pdev, pos + PCI_ERR_ROOT_STATUS, &reg32);
	pci_write_config_dword(pdev, pos + PCI_ERR_ROOT_STATUS, reg32);
}

/**
 * aer_irq - Root Port's ISR
 * @irq: IRQ assigned to Root Port
 * @context: pointer to Root Port data structure
 *
 * Invoked when Root Port detects AER messages.
 */
irqreturn_t aer_irq(int irq, void *context)
{
	unsigned int status, id;
	struct pcie_device *pdev = (struct pcie_device *)context;
	struct aer_rpc *rpc = get_service_data(pdev);
	int next_prod_idx;
	unsigned long flags;
	int pos;

	pos = pci_find_ext_capability(pdev->port, PCI_EXT_CAP_ID_ERR);
	/*
	 * Must lock access to Root Error Status Reg, Root Error ID Reg,
	 * and Root error producer/consumer index
	 */
	spin_lock_irqsave(&rpc->e_lock, flags);

	/* Read error status */
	pci_read_config_dword(pdev->port, pos + PCI_ERR_ROOT_STATUS, &status);
	if (!(status & (PCI_ERR_ROOT_UNCOR_RCV|PCI_ERR_ROOT_COR_RCV))) {
		spin_unlock_irqrestore(&rpc->e_lock, flags);
		return IRQ_NONE;
	}

	/* Read error source and clear error status */
	pci_read_config_dword(pdev->port, pos + PCI_ERR_ROOT_ERR_SRC, &id);
	pci_write_config_dword(pdev->port, pos + PCI_ERR_ROOT_STATUS, status);

	/* Store error source for later DPC handler */
	next_prod_idx = rpc->prod_idx + 1;
	if (next_prod_idx == AER_ERROR_SOURCES_MAX)
		next_prod_idx = 0;
	if (next_prod_idx == rpc->cons_idx) {
		/*
		 * Error Storm Condition - possibly the same error occurred.
		 * Drop the error.
		 */
		spin_unlock_irqrestore(&rpc->e_lock, flags);
		return IRQ_HANDLED;
	}
	rpc->e_sources[rpc->prod_idx].status =  status;
	rpc->e_sources[rpc->prod_idx].id = id;
	rpc->prod_idx = next_prod_idx;
	spin_unlock_irqrestore(&rpc->e_lock, flags);

	/*  Invoke DPC handler */
	schedule_work(&rpc->dpc_handler);

	return IRQ_HANDLED;
}
EXPORT_SYMBOL_GPL(aer_irq);

/**
 * aer_alloc_rpc - allocate Root Port data structure
 * @dev: pointer to the pcie_dev data structure
 *
 * Invoked when Root Port's AER service is loaded.
 */
static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev)
{
	struct aer_rpc *rpc;

	rpc = kzalloc(sizeof(struct aer_rpc), GFP_KERNEL);
	if (!rpc)
		return NULL;

	/* Initialize Root lock access, e_lock, to Root Error Status Reg */
	spin_lock_init(&rpc->e_lock);

	rpc->rpd = dev;
	INIT_WORK(&rpc->dpc_handler, aer_isr);
	mutex_init(&rpc->rpc_mutex);
	init_waitqueue_head(&rpc->wait_release);

	/* Use PCIe bus function to store rpc into PCIe device */
	set_service_data(dev, rpc);

	return rpc;
}

/**
 * aer_remove - clean up resources
 * @dev: pointer to the pcie_dev data structure
 *
 * Invoked when PCI Express bus unloads or AER probe fails.
 */
static void aer_remove(struct pcie_device *dev)
{
	struct aer_rpc *rpc = get_service_data(dev);

	if (rpc) {
		/* If register interrupt service, it must be free. */
		if (rpc->isr)
			free_irq(dev->irq, dev);

		wait_event(rpc->wait_release, rpc->prod_idx == rpc->cons_idx);

		aer_disable_rootport(rpc);
		kfree(rpc);
		set_service_data(dev, NULL);
	}
}

/**
 * aer_probe - initialize resources
 * @dev: pointer to the pcie_dev data structure
 * @id: pointer to the service id data structure
 *
 * Invoked when PCI Express bus loads AER service driver.
 */
static int aer_probe(struct pcie_device *dev)
{
	int status;
	struct aer_rpc *rpc;
	struct device *device = &dev->device;

	/* Init */
	status = aer_init(dev);
	if (status)
		return status;

	/* Alloc rpc data structure */
	rpc = aer_alloc_rpc(dev);
	if (!rpc) {
		dev_printk(KERN_DEBUG, device, "alloc rpc failed\n");
		aer_remove(dev);
		return -ENOMEM;
	}

	/* Request IRQ ISR */
	status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv", dev);
	if (status) {
		dev_printk(KERN_DEBUG, device, "request IRQ failed\n");
		aer_remove(dev);
		return status;
	}

	rpc->isr = 1;

	aer_enable_rootport(rpc);

	return status;
}

/**
 * aer_root_reset - reset link on Root Port
 * @dev: pointer to Root Port's pci_dev data structure
 *
 * Invoked by Port Bus driver when performing link reset at Root Port.
 */
static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
{
	u32 reg32;
	int pos;

	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);

	/* Disable Root's interrupt in response to error messages */
	pci_read_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, &reg32);
	reg32 &= ~ROOT_PORT_INTR_ON_MESG_MASK;
	pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32);

	aer_do_secondary_bus_reset(dev);
	dev_printk(KERN_DEBUG, &dev->dev, "Root Port link has been reset\n");

	/* Clear Root Error Status */
	pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &reg32);
	pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, reg32);

	/* Enable Root Port's interrupt in response to error messages */
	pci_read_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, &reg32);
	reg32 |= ROOT_PORT_INTR_ON_MESG_MASK;
	pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32);

	return PCI_ERS_RESULT_RECOVERED;
}

/**
 * aer_error_detected - update severity status
 * @dev: pointer to Root Port's pci_dev data structure
 * @error: error severity being notified by port bus
 *
 * Invoked by Port Bus driver during error recovery.
 */
static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
			enum pci_channel_state error)
{
	/* Root Port has no impact. Always recovers. */
	return PCI_ERS_RESULT_CAN_RECOVER;
}

/**
 * aer_error_resume - clean up corresponding error status bits
 * @dev: pointer to Root Port's pci_dev data structure
 *
 * Invoked by Port Bus driver during nonfatal recovery.
 */
static void aer_error_resume(struct pci_dev *dev)
{
	int pos;
	u32 status, mask;
	u16 reg16;

	/* Clean up Root device status */
	pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &reg16);
	pcie_capability_write_word(dev, PCI_EXP_DEVSTA, reg16);

	/* Clean AER Root Error Status */
	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
	pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status);
	pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &mask);
	if (dev->error_state == pci_channel_io_normal)
		status &= ~mask; /* Clear corresponding nonfatal bits */
	else
		status &= mask; /* Clear corresponding fatal bits */
	pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);
}

/**
 * aer_service_init - register AER root service driver
 *
 * Invoked when AER root service driver is loaded.
 */
static int __init aer_service_init(void)
{
	if (!pci_aer_available() || aer_acpi_firmware_first())
		return -ENXIO;
	return pcie_port_service_register(&aerdriver);
}

/**
 * aer_service_exit - unregister AER root service driver
 *
 * Invoked when AER root service driver is unloaded.
 */
static void __exit aer_service_exit(void)
{
	pcie_port_service_unregister(&aerdriver);
}

module_init(aer_service_init);
module_exit(aer_service_exit);


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>test-group</groupId>
    <artifactId>test-artifact-${testName}</artifactId>
    <version>1.0</version>

    <build>
        <defaultGoal>package</defaultGoal>

        <plugins>
            <plugin>
                <groupId>com.nesscomputing.mojo</groupId>
                <artifactId>numbers-maven-plugin</artifactId>
                <version>@project.version@</version>
                <executions>
                    <execution>
                        <id>fetchNumbers</id>
                        <goals>
                            <goal>get</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <macros>
                                <macro>
                                    <id>static</id>
                                    <macroType>demo</macroType>
                                    <properties>
                                        <property>
                                            <name>type</name>
                                            <value>static</value>
                                        </property>
                                    </properties>
                                    <export>true</export>
                                </macro>
                                <macro>
                                    <id>property</id>
                                    <macroType>demo</macroType>
                                    <properties>
                                        <property>
                                            <name>type</name>
                                            <value>property</value>
                                        </property>
                                    </properties>
                                    <propertyName>demo.value</propertyName>
                                    <propertyFile>macro.properties</propertyFile>
                                    <export>true</export>
                                </macro>
                                <macro>
                                    <id>config</id>
                                    <macroType>demo</macroType>
                                    <properties>
                                        <property>
                                            <name>type</name>
                                            <value>config</value>
                                        </property>
                                        <property>
                                            <name>value</name>
                                            <value>config-value</value>
                                        </property>
                                    </properties>
                                    <export>true</export>
                                </macro>
                            </macros>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <static>${static}</static>
                            <property>${property}</property>
                            <config>${config}</config>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using EPiServer.Framework.Localization;
using EPiServer.Reference.Commerce.Site.Features.Checkout.Controllers;
using EPiServer.Reference.Commerce.Site.Features.Payment.Services;
using EPiServer.Reference.Commerce.Site.Features.Shared.Services;
using EPiServer.Web.Routing;
using Mediachase.Commerce.Website.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using EPiServer.Reference.Commerce.Site.Features.Cart.Services;
using EPiServer.Reference.Commerce.Site.Features.Checkout.Services;
using EPiServer.Reference.Commerce.Site.Features.Market.Services;
using EPiServer.Reference.Commerce.Site.Features.AddressBook.Services;
using EPiServer.Reference.Commerce.Site.Infrastructure.Facades;

namespace EPiServer.Reference.Commerce.Site.Tests.Features.Checkout.Controllers
{
    [TestClass]
    public class CheckoutControllerTests
    {
        [TestMethod]
        public void OnException_ShouldDelegateToExceptionHandler()
        {
            var testController = CreateTestController();
            testController.CallOnException(_exceptionContext);

            _controllerExceptionHandler.Verify(x => x.HandleRequestValidationException(_exceptionContext, "purchase", testController.OnPurchaseException));
        }

        [TestMethod]
        public void OnPurchaseException_WhenRoutedDataIsntSet_ShouldReturnEmptyResult()
        {
            Setup_RequestContext_to_contain_routed_data(null);
            Setup_exception(new HttpRequestValidationException());

            var result = _subject.OnPurchaseException(_exceptionContext);
            Assert.IsInstanceOfType(result, typeof(EmptyResult));
        }

        Mock<HttpRequestBase> _httpRequestBase;
        Mock<HttpContextBase> _httpContextBase;
        Mock<RequestContext> _requestContext;
        ExceptionContext _exceptionContext;
        Mock<ControllerExceptionHandler> _controllerExceptionHandler;
        CheckoutController _subject;

        [TestInitialize]
        public void Setup()
        {
            _controllerExceptionHandler = new Mock<ControllerExceptionHandler>();
            _requestContext = new Mock<RequestContext>();
            _httpRequestBase = new Mock<HttpRequestBase>();

            _httpContextBase = new Mock<HttpContextBase>();
            _httpContextBase.Setup(x => x.Request).Returns(_httpRequestBase.Object);

            _exceptionContext = new ExceptionContext
            {
                HttpContext = _httpContextBase.Object,
                RequestContext = _requestContext.Object
            };

            _subject = new CheckoutController(null, null, null, null, null, null, null, null, null, null,null, _controllerExceptionHandler.Object,null);
        }

        private CheckoutControllerForTest CreateTestController()
        {
            return new CheckoutControllerForTest(null, null, null, null, null, null, null, null, null, null, null, _controllerExceptionHandler.Object, null);
        }

        private void Setup_RequestContext_to_contain_routed_data(object rotedData)
        {
            var routeData = new RouteData();
            routeData.DataTokens.Add(RoutingConstants.RoutedDataKey, rotedData);

            _requestContext.Setup(x => x.RouteData).Returns(routeData);
        }

        private void Setup_exception(Exception exception)
        {
            _exceptionContext.Exception = exception;
        }

        private class CheckoutControllerForTest : CheckoutController
        {
            public CheckoutControllerForTest(ICartService cartService, IContentRepository contentRepository, UrlResolver urlResolver, IMailService mailService, ICheckoutService checkoutService, IContentLoader contentLoader, IPaymentService paymentService, LocalizationService localizationService, Func<string,CartHelper> cartHelper, CurrencyService currencyService, AddressBookService addressBookService, ControllerExceptionHandler controllerExceptionHandler, CustomerContextFacade customerContextFacade)
                : base(cartService, contentRepository, urlResolver, mailService, checkoutService, contentLoader, paymentService, localizationService, cartHelper, currencyService, addressBookService, controllerExceptionHandler,customerContextFacade)
            {
            }

            public void CallOnException(ExceptionContext filterContext)
            {
                OnException(filterContext);
            }
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class com.fasterxml.jackson.annotation.JsonInclude.Value (Jackson-annotations 2.13.0 API)</title>
<meta name="date" content="2021-09-30">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.fasterxml.jackson.annotation.JsonInclude.Value

Uses of JsonInclude.Value in com.fasterxml.jackson.annotation

Fields in com.fasterxml.jackson.annotation declared as JsonInclude.Value

Modifier and Type
Field and Description

protected static JsonInclude.Value
JsonInclude.Value.EMPTY

Methods in com.fasterxml.jackson.annotation that return JsonInclude.Value

Modifier and Type
Method and Description

static JsonInclude.Value
JsonInclude.Value.construct(JsonInclude.Include valueIncl,
         JsonInclude.Include contentIncl)

Factory method to use for constructing an instance for components

static JsonInclude.Value
JsonInclude.Value.construct(JsonInclude.Include valueIncl,
         JsonInclude.Include contentIncl,
         Class<?> valueFilter,
         Class<?> contentFilter)

Factory method to use for constructing an instance for components

static JsonInclude.Value
JsonInclude.Value.empty()

static JsonInclude.Value
JsonInclude.Value.from(JsonInclude src)

Factory method to use for constructing an instance from instance of
 JsonInclude

static JsonInclude.Value
JsonInclude.Value.merge(JsonInclude.Value base,
     JsonInclude.Value overrides)

Helper method that will try to combine values from two JsonInclude.Value
 instances, using one as base settings, and the other as overrides
 to use instead of base values when defined; base values are only
 use if override does not specify a value (matching value is null
 or logically missing).

static JsonInclude.Value
JsonInclude.Value.mergeAll(JsonInclude.Value... values)

JsonInclude.Value
JsonInclude.Value.withContentFilter(Class<?> filter)

Mutant factory that will either

 Set content as USE_DEFAULTS
 and contentFilter to filter (if filter not null);
 or
 Set content as ALWAYS (if filter null)

JsonInclude.Value
JsonInclude.Value.withContentInclusion(JsonInclude.Include incl)

JsonInclude.Value
JsonInclude.Value.withOverrides(JsonInclude.Value overrides)

Mutant factory method that merges values of this value with given override
 values, so that any explicitly defined inclusion in overrides has precedence over
 settings of this value instance.

JsonInclude.Value
JsonInclude.Value.withValueFilter(Class<?> filter)

Mutant factory that will either

 Set value as USE_DEFAULTS
 and valueFilter to filter (if filter not null);
 or
 Set value as ALWAYS (if filter null)

JsonInclude.Value
JsonInclude.Value.withValueInclusion(JsonInclude.Include incl)

Methods in com.fasterxml.jackson.annotation with parameters of type JsonInclude.Value

Modifier and Type
Method and Description

static JsonInclude.Value
JsonInclude.Value.merge(JsonInclude.Value base,
     JsonInclude.Value overrides)

Helper method that will try to combine values from two JsonInclude.Value
 instances, using one as base settings, and the other as overrides
 to use instead of base values when defined; base values are only
 use if override does not specify a value (matching value is null
 or logically missing).

static JsonInclude.Value
JsonInclude.Value.mergeAll(JsonInclude.Value... values)

JsonInclude.Value
JsonInclude.Value.withOverrides(JsonInclude.Value overrides)

Mutant factory method that merges values of this value with given override
 values, so that any explicitly defined inclusion in overrides has precedence over
 settings of this value instance.

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2008–2021 FasterXML. All rights reserved.


text:
{% extends "base.html" %}

{% block body %}

Contact settings

    {% if email_auth_error %}

            Sorry, but something is wrong with the email address or secret you supplied.

    {% else %}

            These are the email contact settings for {{email_record.email_address}}.

        {% if not email_record.global_opt_out %}

                You will be notified of new updates across all {{site_name}} streams at most once every {{email_record.min_notify_period_seconds}} second{{email_record.min_notify_period_seconds|pluralize}}.

        {% endif %}

        <form action="/email" method="post">
            <input type="hidden" name="address" value="{{address}}">
            <input type="hidden" name="secret" value="{{secret}}">
            {% if email_record.global_opt_out %}

                    You are currently opted-out of all email. If you'd like to receive emails again, please click the following button:
                    <input type="submit" name="action" value="Opt-in">

            {% else %}

                    To never receive another email from this site again, please click the following button:
                    <input type="submit" name="action" value="Opt-out">

            {% endif %}
        </form>
    {% endif %}

{% endblock body %}


text:
using System;

namespace TickTock.Runner
{
    public class JobTaskStatistics
    {
        public Action Publish { get; set; }
    }
}


text:
using System.Buffers;
using System.MemoryTests;
using Xunit;

namespace System.Memory.Tests
{
    public class CommonReadOnlySequenceTests
    {
        [Fact]
        public void SegmentStartIsConsideredInBoundsCheck()
        {
            // 0               50           100    0             50             100
            // [                ##############] -> [##############                ]
            //                         ^c1            ^c2
            var bufferSegment1 = new BufferSegment(new byte[49]);
            BufferSegment bufferSegment2 = bufferSegment1.Append(new byte[50]);

            var buffer = new ReadOnlySequence<byte>(bufferSegment1, 0, bufferSegment2, 50);

            SequencePosition c1 = buffer.GetPosition(buffer.Start, 25); // segment 1 index 75
            SequencePosition c2 = buffer.GetPosition(buffer.Start, 55); // segment 2 index 5

            ReadOnlySequence<byte> sliced = buffer.Slice(c1, c2);
            Assert.Equal(30, sliced.Length);
        }

        [Fact]
        public void GetPositionPrefersNextSegment()
        {
            BufferSegment bufferSegment1 = new BufferSegment(new byte[50]);
            BufferSegment bufferSegment2 = bufferSegment1.Append(new byte[0]);

            ReadOnlySequence<byte> buffer = new ReadOnlySequence<byte>(bufferSegment1, 0, bufferSegment2, 0);

            SequencePosition c1 = buffer.GetPosition(buffer.Start, 50);

            Assert.Equal(0, c1.Index);
            Assert.Equal(bufferSegment2, c1.Segment);
        }

        [Fact]
        public void GetPositionDoesNotCrossOutsideBuffer()
        {
            var bufferSegment1 = new BufferSegment(new byte[100]);
            BufferSegment bufferSegment2 = bufferSegment1.Append(new byte[100]);
            BufferSegment bufferSegment3 = bufferSegment2.Append(new byte[0]);

            var buffer = new ReadOnlySequence<byte>(bufferSegment1, 0, bufferSegment2, 100);

            SequencePosition c1 = buffer.GetPosition(buffer.Start, 200);

            Assert.Equal(100, c1.Index);
            Assert.Equal(bufferSegment2, c1.Segment);
        }

        [Fact]
        public void Create_WorksWithArray()
        {
            var buffer = new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 });
            Assert.Equal(buffer.ToArray(), new byte[] {  1, 2, 3, 4, 5 });
        }

        [Fact]
        public void Empty_ReturnsLengthZeroBuffer()
        {
            var buffer = ReadOnlySequence<byte>.Empty;
            Assert.Equal(0, buffer.Length);
            Assert.Equal(true, buffer.IsSingleSegment);
            Assert.Equal(0, buffer.First.Length);
        }

        [Fact]
        public void Ctor_Array_Offset()
        {
            var buffer = new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 }, 2, 3);
            Assert.Equal(buffer.ToArray(), new byte[] { 3, 4, 5 });
        }

        [Fact]
        public void Ctor_Array_NoOffset()
        {
            var buffer = new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 });
            Assert.Equal(buffer.ToArray(), new byte[] { 1, 2, 3, 4, 5 });
        }

        [Fact]
        public void Ctor_Array_ValidatesArguments()
        {
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 }, 6, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 }, 4, 2));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 }, -4, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(new byte[] { 1, 2, 3, 4, 5 }, 4, -2));
            Assert.Throws<ArgumentNullException>(() => new ReadOnlySequence<byte>((byte[])null, 4, 2));
        }

        [Fact]
        public void Ctor_OwnedMemory_Offset()
        {
            var ownedMemory = new CustomMemoryForTest<byte>(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
            var buffer = new ReadOnlySequence<byte>(ownedMemory, 2, 3);
            Assert.Equal(buffer.ToArray(), new byte[] { 3, 4, 5 });
        }

        [Fact]
        public void Ctor_OwnedMemory_NoOffset()
        {
            var ownedMemory = new CustomMemoryForTest<byte>(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
            var buffer = new ReadOnlySequence<byte>(ownedMemory);
            Assert.Equal(buffer.ToArray(), new byte[] { 1, 2, 3, 4, 5 });
        }

        [Fact]
        public void Ctor_OwnedMemory_ValidatesArguments()
        {
            var ownedMemory = new CustomMemoryForTest<byte>(new byte[] { 1, 2, 3, 4, 5 }, 0, 5);
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(ownedMemory, 6, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(ownedMemory, 4, 2));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(ownedMemory, -4, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(ownedMemory, 4, -2));
            Assert.Throws<ArgumentNullException>(() => new ReadOnlySequence<byte>((CustomMemoryForTest<byte>)null, 4, 2));
        }

        [Fact]
        public void Ctor_Memory()
        {
            var memory = new ReadOnlyMemory<byte>(new byte[] { 1, 2, 3, 4, 5 });
            var buffer = new ReadOnlySequence<byte>(memory.Slice(2, 3));
            Assert.Equal(new byte[] { 3, 4, 5 }, buffer.ToArray());
        }

        [Fact]
        public void Ctor_MemoryList_ValidatesArguments()
        {
            var segment = new BufferSegment(new byte[] { 1, 2, 3, 4, 5 });
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(segment, 6, segment, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(segment, 0, segment, 6));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(segment, 3, segment, 0));

            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(segment, -5, segment, 0));
            Assert.Throws<ArgumentOutOfRangeException>(() => new ReadOnlySequence<byte>(segment, 0, segment, -5));

            Assert.Throws<ArgumentNullException>(() => new ReadOnlySequence<byte>(null, 5, segment, 0));
            Assert.Throws<ArgumentNullException>(() => new ReadOnlySequence<byte>(segment, 5, null, 0));
        }

    }
}


text:
namespace stratum {
namespace p4c_backends {

FieldNameInspector::FieldNameInspector()
    : ignored_path_prefixes_(GetP4ModelNames().strip_path_prefixes()),
      field_name_("") {
}

void FieldNameInspector::ExtractName(const IR::Expression& expression) {
  if (!field_name_.empty()) {
    LOG(ERROR) << "ExtractName has already run in this FieldNameInspector";
    field_name_ = "";
    return;
  }

  // When the expression is applied to this FieldNameInspector, it causes
  // the postorder methods to run and extract the field path strings.
  // TODO(unknown): Figure out how to report a syntax error if arithmetic
  //                 appears in the expression.
  VLOG(4) << "ExtractName from " << expression.toString();
  absl::LeakCheckDisabler disable_ir_expression_leak_checks;
  expression.apply(*this);
  VLOG(4) << "Extracted field name is " << field_name_;
}

// Saves the member name as part of the field name.  Also handles header
// stacks upon encountering the P4 parser ".next" operator.
void FieldNameInspector::postorder(const IR::Member* member) {
  VLOG(4) << "FieldNameInspector Member " << member->member;
  if (member->member == IR::Type_Stack::next) {
    AppendStackedHeaderPathNames();
  } else {
    auto stack = member->type->to<IR::Type_Stack>();
    if (stack != nullptr)
      stack_size_ = stack->getSize();
  }
  AppendName(std::string(member->member.name));
}

void FieldNameInspector::postorder(const IR::Type_Stack* stack) {
  VLOG(4) << "FieldNameInspector found a header stack " << stack->toString();
  // TODO(unknown): Does this need to set a flag for header stack processing?
  //                 Could an IR::ArrayIndex appear in some other context?
}

// Saves the path name as part of the field name, subject to ignored prefixes.
void FieldNameInspector::postorder(const IR::PathExpression* path) {
  VLOG(4) << "FieldNameInspector Path " << path->toString();
  if (!path->type->is<IR::Type_Struct>()) {
    // TODO(unknown): What is the proper way to handle this error?
    LOG(ERROR) << "Expected header path expression " << path
               << " to be Type_struct";
    return;
  }

  // The V1 conversion prefixes are ignored at the beginning of the name.
  const std::string path_name(std::string(path->path->name.toString()));
  if (field_name_.empty()) {
    if (ignored_path_prefixes_.find(path_name) !=
        ignored_path_prefixes_.end()) {
      ignored_path_prefixes_.clear();
      return;
    }
  }
  AppendName(path_name);
}

// The index value comes from the array_index right expression, which
// should be Constant for this implementation.
void FieldNameInspector::postorder(const IR::ArrayIndex* array_index) {
  VLOG(4) << "FieldNameInspector Array Index " << array_index->toString();
  if (!array_index->right->is<IR::Constant>()) {
    LOG(ERROR) << "Expected array index right field to be Constant "
               << array_index->right;
    // TODO(unknown): What is the proper way to handle this error?
    return;
  }
  auto header_stack_index = array_index->right->to<IR::Constant>();
  if (!field_name_.empty()) {
    field_name_ = AddHeaderArrayIndex(field_name_, header_stack_index->asInt());
  }
}

void FieldNameInspector::AppendName(const std::string& name) {
  if (field_name_.empty()) {
    field_name_ = name;
  } else {
    field_name_ += "." + name;
  }
}

void FieldNameInspector::AppendStackedHeaderPathNames() {
  for (uint32_t i = 0; i < stack_size_; ++i) {
    stacked_header_names_.push_back(AddHeaderArrayIndex(field_name_, i));
  }
  stacked_header_names_.push_back(AddHeaderArrayLast(field_name_));
}

}  // namespace p4c_backends
}  // namespace stratum


text:
package org.apache.camel.builder.endpoint.dsl;

import java.util.Map;
import javax.annotation.Generated;
import org.apache.camel.ExchangePattern;
import org.apache.camel.builder.EndpointConsumerBuilder;
import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
import org.apache.camel.spi.ExceptionHandler;

/**
 * Capture changes from a MongoDB database.
 *
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface DebeziumMongodbEndpointBuilderFactory {

    /**
     * Builder for endpoint for the Debezium MongoDB Connector component.
     */
    public interface DebeziumMongodbEndpointBuilder
            extends
                EndpointConsumerBuilder {
        default AdvancedDebeziumMongodbEndpointBuilder advanced() {
            return (AdvancedDebeziumMongodbEndpointBuilder) this;
        }
        /**
         * Additional properties for debezium components in case they can't be
         * set directly on the camel configurations (e.g: setting Kafka Connect
         * properties needed by Debezium engine, for example setting
         * KafkaOffsetBackingStore), the properties have to be prefixed with
         * additionalProperties.. E.g:
         * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro.
         *
         * The option is a: java.util.Map<java.lang.String,
         * java.lang.Object> type.
         * The option is multivalued, and you can use the
         * additionalProperties(String, Object) method to add a value (call the
         * method multiple times to set more values).
         *
         * Group: common
         *
         * @param key the option key
         * @param value the option value
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder additionalProperties(
                String key,
                Object value) {
            doSetMultiValueProperty("additionalProperties", "additionalProperties." + key, value);
            return this;
        }
        /**
         * Additional properties for debezium components in case they can't be
         * set directly on the camel configurations (e.g: setting Kafka Connect
         * properties needed by Debezium engine, for example setting
         * KafkaOffsetBackingStore), the properties have to be prefixed with
         * additionalProperties.. E.g:
         * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro.
         *
         * The option is a: java.util.Map<java.lang.String,
         * java.lang.Object> type.
         * The option is multivalued, and you can use the
         * additionalProperties(String, Object) method to add a value (call the
         * method multiple times to set more values).
         *
         * Group: common
         *
         * @param values the values
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder additionalProperties(Map values) {
            doSetMultiValueProperties("additionalProperties", "additionalProperties.", values);
            return this;
        }
        /**
         * Allows for bridging the consumer to the Camel routing Error Handler,
         * which mean any exceptions occurred while the consumer is trying to
         * pickup incoming messages, or the likes, will now be processed as a
         * message and handled by the routing Error Handler. By default the
         * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
         * with exceptions, that will be logged at WARN or ERROR level and
         * ignored.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: consumer
         *
         * @param bridgeErrorHandler the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder bridgeErrorHandler(
                boolean bridgeErrorHandler) {
            doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
            return this;
        }
        /**
         * Allows for bridging the consumer to the Camel routing Error Handler,
         * which mean any exceptions occurred while the consumer is trying to
         * pickup incoming messages, or the likes, will now be processed as a
         * message and handled by the routing Error Handler. By default the
         * consumer will use the org.apache.camel.spi.ExceptionHandler to deal
         * with exceptions, that will be logged at WARN or ERROR level and
         * ignored.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: consumer
         *
         * @param bridgeErrorHandler the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder bridgeErrorHandler(
                String bridgeErrorHandler) {
            doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
            return this;
        }
        /**
         * The Converter class that should be used to serialize and deserialize
         * key data for offsets. The default is JSON converter.
         *
         * The option is a: java.lang.String type.
         *
         * Default: org.apache.kafka.connect.json.JsonConverter
         * Group: consumer
         *
         * @param internalKeyConverter the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder internalKeyConverter(
                String internalKeyConverter) {
            doSetProperty("internalKeyConverter", internalKeyConverter);
            return this;
        }
        /**
         * The Converter class that should be used to serialize and deserialize
         * value data for offsets. The default is JSON converter.
         *
         * The option is a: java.lang.String type.
         *
         * Default: org.apache.kafka.connect.json.JsonConverter
         * Group: consumer
         *
         * @param internalValueConverter the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder internalValueConverter(
                String internalValueConverter) {
            doSetProperty("internalValueConverter", internalValueConverter);
            return this;
        }
        /**
         * The name of the Java class of the commit policy. It defines when
         * offsets commit has to be triggered based on the number of events
         * processed and the time elapsed since the last commit. This class must
         * implement the interface 'OffsetCommitPolicy'. The default is a
         * periodic commit policy based upon time intervals.
         *
         * The option is a: java.lang.String type.
         *
         * Default:
         * io.debezium.embedded.spi.OffsetCommitPolicy.PeriodicCommitOffsetPolicy
         * Group: consumer
         *
         * @param offsetCommitPolicy the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetCommitPolicy(
                String offsetCommitPolicy) {
            doSetProperty("offsetCommitPolicy", offsetCommitPolicy);
            return this;
        }
        /**
         * Maximum number of milliseconds to wait for records to flush and
         * partition offset data to be committed to offset storage before
         * cancelling the process and restoring the offset data to be committed
         * in a future attempt. The default is 5 seconds.
         *
         * The option is a: long type.
         *
         * Default: 5000
         * Group: consumer
         *
         * @param offsetCommitTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetCommitTimeoutMs(
                long offsetCommitTimeoutMs) {
            doSetProperty("offsetCommitTimeoutMs", offsetCommitTimeoutMs);
            return this;
        }
        /**
         * Maximum number of milliseconds to wait for records to flush and
         * partition offset data to be committed to offset storage before
         * cancelling the process and restoring the offset data to be committed
         * in a future attempt. The default is 5 seconds.
         *
         * The option will be converted to a long type.
         *
         * Default: 5000
         * Group: consumer
         *
         * @param offsetCommitTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetCommitTimeoutMs(
                String offsetCommitTimeoutMs) {
            doSetProperty("offsetCommitTimeoutMs", offsetCommitTimeoutMs);
            return this;
        }
        /**
         * Interval at which to try committing offsets. The default is 1 minute.
         *
         * The option is a: long type.
         *
         * Default: 60000
         * Group: consumer
         *
         * @param offsetFlushIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetFlushIntervalMs(
                long offsetFlushIntervalMs) {
            doSetProperty("offsetFlushIntervalMs", offsetFlushIntervalMs);
            return this;
        }
        /**
         * Interval at which to try committing offsets. The default is 1 minute.
         *
         * The option will be converted to a long type.
         *
         * Default: 60000
         * Group: consumer
         *
         * @param offsetFlushIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetFlushIntervalMs(
                String offsetFlushIntervalMs) {
            doSetProperty("offsetFlushIntervalMs", offsetFlushIntervalMs);
            return this;
        }
        /**
         * The name of the Java class that is responsible for persistence of
         * connector offsets.
         *
         * The option is a: java.lang.String type.
         *
         * Default: org.apache.kafka.connect.storage.FileOffsetBackingStore
         * Group: consumer
         *
         * @param offsetStorage the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStorage(
                String offsetStorage) {
            doSetProperty("offsetStorage", offsetStorage);
            return this;
        }
        /**
         * Path to file where offsets are to be stored. Required when
         * offset.storage is set to the FileOffsetBackingStore.
         *
         * The option is a: java.lang.String type.
         *
         * Group: consumer
         *
         * @param offsetStorageFileName the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStorageFileName(
                String offsetStorageFileName) {
            doSetProperty("offsetStorageFileName", offsetStorageFileName);
            return this;
        }
        /**
         * The number of partitions used when creating the offset storage topic.
         * Required when offset.storage is set to the 'KafkaOffsetBackingStore'.
         *
         * The option is a: int type.
         *
         * Group: consumer
         *
         * @param offsetStoragePartitions the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStoragePartitions(
                int offsetStoragePartitions) {
            doSetProperty("offsetStoragePartitions", offsetStoragePartitions);
            return this;
        }
        /**
         * The number of partitions used when creating the offset storage topic.
         * Required when offset.storage is set to the 'KafkaOffsetBackingStore'.
         *
         * The option will be converted to a int type.
         *
         * Group: consumer
         *
         * @param offsetStoragePartitions the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStoragePartitions(
                String offsetStoragePartitions) {
            doSetProperty("offsetStoragePartitions", offsetStoragePartitions);
            return this;
        }
        /**
         * Replication factor used when creating the offset storage topic.
         * Required when offset.storage is set to the KafkaOffsetBackingStore.
         *
         * The option is a: int type.
         *
         * Group: consumer
         *
         * @param offsetStorageReplicationFactor the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStorageReplicationFactor(
                int offsetStorageReplicationFactor) {
            doSetProperty("offsetStorageReplicationFactor", offsetStorageReplicationFactor);
            return this;
        }
        /**
         * Replication factor used when creating the offset storage topic.
         * Required when offset.storage is set to the KafkaOffsetBackingStore.
         *
         * The option will be converted to a int type.
         *
         * Group: consumer
         *
         * @param offsetStorageReplicationFactor the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStorageReplicationFactor(
                String offsetStorageReplicationFactor) {
            doSetProperty("offsetStorageReplicationFactor", offsetStorageReplicationFactor);
            return this;
        }
        /**
         * The name of the Kafka topic where offsets are to be stored. Required
         * when offset.storage is set to the KafkaOffsetBackingStore.
         *
         * The option is a: java.lang.String type.
         *
         * Group: consumer
         *
         * @param offsetStorageTopic the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder offsetStorageTopic(
                String offsetStorageTopic) {
            doSetProperty("offsetStorageTopic", offsetStorageTopic);
            return this;
        }
        /**
         * A comma-separated list of regular expressions that match the
         * collection names for which changes are to be excluded.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param collectionExcludeList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder collectionExcludeList(
                String collectionExcludeList) {
            doSetProperty("collectionExcludeList", collectionExcludeList);
            return this;
        }
        /**
         * A comma-separated list of regular expressions that match the
         * collection names for which changes are to be captured.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param collectionIncludeList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder collectionIncludeList(
                String collectionIncludeList) {
            doSetProperty("collectionIncludeList", collectionIncludeList);
            return this;
        }
        /**
         * The initial delay when trying to reconnect to a primary after a
         * connection cannot be made or when no primary is available, given in
         * milliseconds. Defaults to 1 second (1,000 ms).
         *
         * The option is a: long type.
         *
         * Default: 1s
         * Group: mongodb
         *
         * @param connectBackoffInitialDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectBackoffInitialDelayMs(
                long connectBackoffInitialDelayMs) {
            doSetProperty("connectBackoffInitialDelayMs", connectBackoffInitialDelayMs);
            return this;
        }
        /**
         * The initial delay when trying to reconnect to a primary after a
         * connection cannot be made or when no primary is available, given in
         * milliseconds. Defaults to 1 second (1,000 ms).
         *
         * The option will be converted to a long type.
         *
         * Default: 1s
         * Group: mongodb
         *
         * @param connectBackoffInitialDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectBackoffInitialDelayMs(
                String connectBackoffInitialDelayMs) {
            doSetProperty("connectBackoffInitialDelayMs", connectBackoffInitialDelayMs);
            return this;
        }
        /**
         * The maximum delay when trying to reconnect to a primary after a
         * connection cannot be made or when no primary is available, given in
         * milliseconds. Defaults to 120 second (120,000 ms).
         *
         * The option is a: long type.
         *
         * Default: 2m
         * Group: mongodb
         *
         * @param connectBackoffMaxDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectBackoffMaxDelayMs(
                long connectBackoffMaxDelayMs) {
            doSetProperty("connectBackoffMaxDelayMs", connectBackoffMaxDelayMs);
            return this;
        }
        /**
         * The maximum delay when trying to reconnect to a primary after a
         * connection cannot be made or when no primary is available, given in
         * milliseconds. Defaults to 120 second (120,000 ms).
         *
         * The option will be converted to a long type.
         *
         * Default: 2m
         * Group: mongodb
         *
         * @param connectBackoffMaxDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectBackoffMaxDelayMs(
                String connectBackoffMaxDelayMs) {
            doSetProperty("connectBackoffMaxDelayMs", connectBackoffMaxDelayMs);
            return this;
        }
        /**
         * Maximum number of failed connection attempts to a replica set primary
         * before an exception occurs and task is aborted. Defaults to 16, which
         * with the defaults for 'connect.backoff.initial.delay.ms' and
         * 'connect.backoff.max.delay.ms' results in just over 20 minutes of
         * attempts before failing.
         *
         * The option is a: int type.
         *
         * Default: 16
         * Group: mongodb
         *
         * @param connectMaxAttempts the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectMaxAttempts(
                int connectMaxAttempts) {
            doSetProperty("connectMaxAttempts", connectMaxAttempts);
            return this;
        }
        /**
         * Maximum number of failed connection attempts to a replica set primary
         * before an exception occurs and task is aborted. Defaults to 16, which
         * with the defaults for 'connect.backoff.initial.delay.ms' and
         * 'connect.backoff.max.delay.ms' results in just over 20 minutes of
         * attempts before failing.
         *
         * The option will be converted to a int type.
         *
         * Default: 16
         * Group: mongodb
         *
         * @param connectMaxAttempts the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder connectMaxAttempts(
                String connectMaxAttempts) {
            doSetProperty("connectMaxAttempts", connectMaxAttempts);
            return this;
        }
        /**
         * Optional list of custom converters that would be used instead of
         * default ones. The converters are defined using '.type' config option
         * and configured using options '.'.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param converters the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder converters(String converters) {
            doSetProperty("converters", converters);
            return this;
        }
        /**
         * The maximum processing time in milliseconds to wait for the oplog
         * cursor to process a single poll request.
         *
         * The option is a: int type.
         *
         * Group: mongodb
         *
         * @param cursorMaxAwaitTimeMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder cursorMaxAwaitTimeMs(
                int cursorMaxAwaitTimeMs) {
            doSetProperty("cursorMaxAwaitTimeMs", cursorMaxAwaitTimeMs);
            return this;
        }
        /**
         * The maximum processing time in milliseconds to wait for the oplog
         * cursor to process a single poll request.
         *
         * The option will be converted to a int type.
         *
         * Group: mongodb
         *
         * @param cursorMaxAwaitTimeMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder cursorMaxAwaitTimeMs(
                String cursorMaxAwaitTimeMs) {
            doSetProperty("cursorMaxAwaitTimeMs", cursorMaxAwaitTimeMs);
            return this;
        }
        /**
         * A comma-separated list of regular expressions that match the database
         * names for which changes are to be excluded.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param databaseExcludeList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder databaseExcludeList(
                String databaseExcludeList) {
            doSetProperty("databaseExcludeList", databaseExcludeList);
            return this;
        }
        /**
         * The path to the file that will be used to record the database
         * history.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param databaseHistoryFileFilename the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder databaseHistoryFileFilename(
                String databaseHistoryFileFilename) {
            doSetProperty("databaseHistoryFileFilename", databaseHistoryFileFilename);
            return this;
        }
        /**
         * A comma-separated list of regular expressions that match the database
         * names for which changes are to be captured.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param databaseIncludeList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder databaseIncludeList(
                String databaseIncludeList) {
            doSetProperty("databaseIncludeList", databaseIncludeList);
            return this;
        }
        /**
         * Specify how failures during processing of events (i.e. when
         * encountering a corrupted event) should be handled, including:'fail'
         * (the default) an exception indicating the problematic event and its
         * position is raised, causing the connector to be stopped; 'warn' the
         * problematic event and its position will be logged and the event will
         * be skipped;'ignore' the problematic event will be skipped.
         *
         * The option is a: java.lang.String type.
         *
         * Default: fail
         * Group: mongodb
         *
         * @param eventProcessingFailureHandlingMode the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder eventProcessingFailureHandlingMode(
                String eventProcessingFailureHandlingMode) {
            doSetProperty("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode);
            return this;
        }
        /**
         * A comma-separated list of the fully-qualified names of fields that
         * should be excluded from change event message values.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param fieldExcludeList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder fieldExcludeList(
                String fieldExcludeList) {
            doSetProperty("fieldExcludeList", fieldExcludeList);
            return this;
        }
        /**
         * A comma-separated list of the fully-qualified replacements of fields
         * that should be used to rename fields in change event message values.
         * Fully-qualified replacements for fields are of the form
         * databaseName.collectionName.fieldName.nestedFieldName:newNestedFieldName, where databaseName and collectionName may contain the wildcard () which matches any characters, the colon character (:) is used to determine rename mapping of field.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param fieldRenames the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder fieldRenames(String fieldRenames) {
            doSetProperty("fieldRenames", fieldRenames);
            return this;
        }
        /**
         * Length of an interval in milli-seconds in in which the connector
         * periodically sends heartbeat messages to a heartbeat topic. Use 0 to
         * disable heartbeat messages. Disabled by default.
         *
         * The option is a: int type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param heartbeatIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder heartbeatIntervalMs(
                int heartbeatIntervalMs) {
            doSetProperty("heartbeatIntervalMs", heartbeatIntervalMs);
            return this;
        }
        /**
         * Length of an interval in milli-seconds in in which the connector
         * periodically sends heartbeat messages to a heartbeat topic. Use 0 to
         * disable heartbeat messages. Disabled by default.
         *
         * The option will be converted to a int type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param heartbeatIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder heartbeatIntervalMs(
                String heartbeatIntervalMs) {
            doSetProperty("heartbeatIntervalMs", heartbeatIntervalMs);
            return this;
        }
        /**
         * The prefix that is used to name heartbeat topics.Defaults to
         * __debezium-heartbeat.
         *
         * The option is a: java.lang.String type.
         *
         * Default: __debezium-heartbeat
         * Group: mongodb
         *
         * @param heartbeatTopicsPrefix the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder heartbeatTopicsPrefix(
                String heartbeatTopicsPrefix) {
            doSetProperty("heartbeatTopicsPrefix", heartbeatTopicsPrefix);
            return this;
        }
        /**
         * Maximum size of each batch of source records. Defaults to 2048.
         *
         * The option is a: int type.
         *
         * Default: 2048
         * Group: mongodb
         *
         * @param maxBatchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxBatchSize(int maxBatchSize) {
            doSetProperty("maxBatchSize", maxBatchSize);
            return this;
        }
        /**
         * Maximum size of each batch of source records. Defaults to 2048.
         *
         * The option will be converted to a int type.
         *
         * Default: 2048
         * Group: mongodb
         *
         * @param maxBatchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxBatchSize(String maxBatchSize) {
            doSetProperty("maxBatchSize", maxBatchSize);
            return this;
        }
        /**
         * Maximum size of the queue for change events read from the database
         * log but not yet recorded or forwarded. Defaults to 8192, and should
         * always be larger than the maximum batch size.
         *
         * The option is a: int type.
         *
         * Default: 8192
         * Group: mongodb
         *
         * @param maxQueueSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxQueueSize(int maxQueueSize) {
            doSetProperty("maxQueueSize", maxQueueSize);
            return this;
        }
        /**
         * Maximum size of the queue for change events read from the database
         * log but not yet recorded or forwarded. Defaults to 8192, and should
         * always be larger than the maximum batch size.
         *
         * The option will be converted to a int type.
         *
         * Default: 8192
         * Group: mongodb
         *
         * @param maxQueueSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxQueueSize(String maxQueueSize) {
            doSetProperty("maxQueueSize", maxQueueSize);
            return this;
        }
        /**
         * Maximum size of the queue in bytes for change events read from the
         * database log but not yet recorded or forwarded. Defaults to 0. Mean
         * the feature is not enabled.
         *
         * The option is a: long type.
         *
         * Default: 0
         * Group: mongodb
         *
         * @param maxQueueSizeInBytes the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxQueueSizeInBytes(
                long maxQueueSizeInBytes) {
            doSetProperty("maxQueueSizeInBytes", maxQueueSizeInBytes);
            return this;
        }
        /**
         * Maximum size of the queue in bytes for change events read from the
         * database log but not yet recorded or forwarded. Defaults to 0. Mean
         * the feature is not enabled.
         *
         * The option will be converted to a long type.
         *
         * Default: 0
         * Group: mongodb
         *
         * @param maxQueueSizeInBytes the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder maxQueueSizeInBytes(
                String maxQueueSizeInBytes) {
            doSetProperty("maxQueueSizeInBytes", maxQueueSizeInBytes);
            return this;
        }
        /**
         * Database containing user credentials.
         *
         * The option is a: java.lang.String type.
         *
         * Default: admin
         * Group: mongodb
         *
         * @param mongodbAuthsource the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbAuthsource(
                String mongodbAuthsource) {
            doSetProperty("mongodbAuthsource", mongodbAuthsource);
            return this;
        }
        /**
         * The connection timeout, given in milliseconds. Defaults to 10 seconds
         * (10,000 ms).
         *
         * The option is a: int type.
         *
         * Default: 10s
         * Group: mongodb
         *
         * @param mongodbConnectTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbConnectTimeoutMs(
                int mongodbConnectTimeoutMs) {
            doSetProperty("mongodbConnectTimeoutMs", mongodbConnectTimeoutMs);
            return this;
        }
        /**
         * The connection timeout, given in milliseconds. Defaults to 10 seconds
         * (10,000 ms).
         *
         * The option will be converted to a int type.
         *
         * Default: 10s
         * Group: mongodb
         *
         * @param mongodbConnectTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbConnectTimeoutMs(
                String mongodbConnectTimeoutMs) {
            doSetProperty("mongodbConnectTimeoutMs", mongodbConnectTimeoutMs);
            return this;
        }
        /**
         * The hostname and port pairs (in the form 'host' or 'host:port') of
         * the MongoDB server(s) in the replica set.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param mongodbHosts the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbHosts(String mongodbHosts) {
            doSetProperty("mongodbHosts", mongodbHosts);
            return this;
        }
        /**
         * Specifies whether the addresses in 'hosts' are seeds that should be
         * used to discover all members of the cluster or replica set ('true'),
         * or whether the address(es) in 'hosts' should be used as is ('false').
         * The default is 'true'.
         *
         * The option is a: boolean type.
         *
         * Default: true
         * Group: mongodb
         *
         * @param mongodbMembersAutoDiscover the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbMembersAutoDiscover(
                boolean mongodbMembersAutoDiscover) {
            doSetProperty("mongodbMembersAutoDiscover", mongodbMembersAutoDiscover);
            return this;
        }
        /**
         * Specifies whether the addresses in 'hosts' are seeds that should be
         * used to discover all members of the cluster or replica set ('true'),
         * or whether the address(es) in 'hosts' should be used as is ('false').
         * The default is 'true'.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: true
         * Group: mongodb
         *
         * @param mongodbMembersAutoDiscover the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbMembersAutoDiscover(
                String mongodbMembersAutoDiscover) {
            doSetProperty("mongodbMembersAutoDiscover", mongodbMembersAutoDiscover);
            return this;
        }
        /**
         * Unique name that identifies the MongoDB replica set or cluster and
         * all recorded offsets, andthat is used as a prefix for all schemas and
         * topics. Each distinct MongoDB installation should have a separate
         * namespace and monitored by at most one Debezium connector.
         *
         * The option is a: java.lang.String type.
         *
         * Required: true
         * Group: mongodb
         *
         * @param mongodbName the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbName(String mongodbName) {
            doSetProperty("mongodbName", mongodbName);
            return this;
        }
        /**
         * Password to be used when connecting to MongoDB, if necessary.
         *
         * The option is a: java.lang.String type.
         *
         * Required: true
         * Group: mongodb
         *
         * @param mongodbPassword the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbPassword(
                String mongodbPassword) {
            doSetProperty("mongodbPassword", mongodbPassword);
            return this;
        }
        /**
         * Interval for looking for new, removed, or changed replica sets, given
         * in milliseconds. Defaults to 30 seconds (30,000 ms).
         *
         * The option is a: long type.
         *
         * Default: 30s
         * Group: mongodb
         *
         * @param mongodbPollIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbPollIntervalMs(
                long mongodbPollIntervalMs) {
            doSetProperty("mongodbPollIntervalMs", mongodbPollIntervalMs);
            return this;
        }
        /**
         * Interval for looking for new, removed, or changed replica sets, given
         * in milliseconds. Defaults to 30 seconds (30,000 ms).
         *
         * The option will be converted to a long type.
         *
         * Default: 30s
         * Group: mongodb
         *
         * @param mongodbPollIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbPollIntervalMs(
                String mongodbPollIntervalMs) {
            doSetProperty("mongodbPollIntervalMs", mongodbPollIntervalMs);
            return this;
        }
        /**
         * The server selection timeout, given in milliseconds. Defaults to 10
         * seconds (10,000 ms).
         *
         * The option is a: int type.
         *
         * Default: 30s
         * Group: mongodb
         *
         * @param mongodbServerSelectionTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbServerSelectionTimeoutMs(
                int mongodbServerSelectionTimeoutMs) {
            doSetProperty("mongodbServerSelectionTimeoutMs", mongodbServerSelectionTimeoutMs);
            return this;
        }
        /**
         * The server selection timeout, given in milliseconds. Defaults to 10
         * seconds (10,000 ms).
         *
         * The option will be converted to a int type.
         *
         * Default: 30s
         * Group: mongodb
         *
         * @param mongodbServerSelectionTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbServerSelectionTimeoutMs(
                String mongodbServerSelectionTimeoutMs) {
            doSetProperty("mongodbServerSelectionTimeoutMs", mongodbServerSelectionTimeoutMs);
            return this;
        }
        /**
         * The socket timeout, given in milliseconds. Defaults to 0 ms.
         *
         * The option is a: int type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param mongodbSocketTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSocketTimeoutMs(
                int mongodbSocketTimeoutMs) {
            doSetProperty("mongodbSocketTimeoutMs", mongodbSocketTimeoutMs);
            return this;
        }
        /**
         * The socket timeout, given in milliseconds. Defaults to 0 ms.
         *
         * The option will be converted to a int type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param mongodbSocketTimeoutMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSocketTimeoutMs(
                String mongodbSocketTimeoutMs) {
            doSetProperty("mongodbSocketTimeoutMs", mongodbSocketTimeoutMs);
            return this;
        }
        /**
         * Should connector use SSL to connect to MongoDB instances.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param mongodbSslEnabled the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSslEnabled(
                boolean mongodbSslEnabled) {
            doSetProperty("mongodbSslEnabled", mongodbSslEnabled);
            return this;
        }
        /**
         * Should connector use SSL to connect to MongoDB instances.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param mongodbSslEnabled the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSslEnabled(
                String mongodbSslEnabled) {
            doSetProperty("mongodbSslEnabled", mongodbSslEnabled);
            return this;
        }
        /**
         * Whether invalid host names are allowed when using SSL. If true the
         * connection will not prevent man-in-the-middle attacks.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param mongodbSslInvalidHostnameAllowed the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSslInvalidHostnameAllowed(
                boolean mongodbSslInvalidHostnameAllowed) {
            doSetProperty("mongodbSslInvalidHostnameAllowed", mongodbSslInvalidHostnameAllowed);
            return this;
        }
        /**
         * Whether invalid host names are allowed when using SSL. If true the
         * connection will not prevent man-in-the-middle attacks.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param mongodbSslInvalidHostnameAllowed the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbSslInvalidHostnameAllowed(
                String mongodbSslInvalidHostnameAllowed) {
            doSetProperty("mongodbSslInvalidHostnameAllowed", mongodbSslInvalidHostnameAllowed);
            return this;
        }
        /**
         * Database user for connecting to MongoDB, if necessary.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param mongodbUser the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder mongodbUser(String mongodbUser) {
            doSetProperty("mongodbUser", mongodbUser);
            return this;
        }
        /**
         * Time to wait for new change events to appear after receiving no
         * events, given in milliseconds. Defaults to 500 ms.
         *
         * The option is a: long type.
         *
         * Default: 500ms
         * Group: mongodb
         *
         * @param pollIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder pollIntervalMs(
                long pollIntervalMs) {
            doSetProperty("pollIntervalMs", pollIntervalMs);
            return this;
        }
        /**
         * Time to wait for new change events to appear after receiving no
         * events, given in milliseconds. Defaults to 500 ms.
         *
         * The option will be converted to a long type.
         *
         * Default: 500ms
         * Group: mongodb
         *
         * @param pollIntervalMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder pollIntervalMs(
                String pollIntervalMs) {
            doSetProperty("pollIntervalMs", pollIntervalMs);
            return this;
        }
        /**
         * Enables transaction metadata extraction together with event counting.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param provideTransactionMetadata the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder provideTransactionMetadata(
                boolean provideTransactionMetadata) {
            doSetProperty("provideTransactionMetadata", provideTransactionMetadata);
            return this;
        }
        /**
         * Enables transaction metadata extraction together with event counting.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param provideTransactionMetadata the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder provideTransactionMetadata(
                String provideTransactionMetadata) {
            doSetProperty("provideTransactionMetadata", provideTransactionMetadata);
            return this;
        }
        /**
         * The maximum number of records that should be loaded into memory while
         * streaming. A value of 0 uses the default JDBC fetch size.
         *
         * The option is a: int type.
         *
         * Default: 0
         * Group: mongodb
         *
         * @param queryFetchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder queryFetchSize(int queryFetchSize) {
            doSetProperty("queryFetchSize", queryFetchSize);
            return this;
        }
        /**
         * The maximum number of records that should be loaded into memory while
         * streaming. A value of 0 uses the default JDBC fetch size.
         *
         * The option will be converted to a int type.
         *
         * Default: 0
         * Group: mongodb
         *
         * @param queryFetchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder queryFetchSize(
                String queryFetchSize) {
            doSetProperty("queryFetchSize", queryFetchSize);
            return this;
        }
        /**
         * Time to wait before restarting connector after retriable exception
         * occurs. Defaults to 10000ms.
         *
         * The option is a: long type.
         *
         * Default: 10s
         * Group: mongodb
         *
         * @param retriableRestartConnectorWaitMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder retriableRestartConnectorWaitMs(
                long retriableRestartConnectorWaitMs) {
            doSetProperty("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs);
            return this;
        }
        /**
         * Time to wait before restarting connector after retriable exception
         * occurs. Defaults to 10000ms.
         *
         * The option will be converted to a long type.
         *
         * Default: 10s
         * Group: mongodb
         *
         * @param retriableRestartConnectorWaitMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder retriableRestartConnectorWaitMs(
                String retriableRestartConnectorWaitMs) {
            doSetProperty("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs);
            return this;
        }
        /**
         * Whether field names will be sanitized to Avro naming conventions.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param sanitizeFieldNames the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder sanitizeFieldNames(
                boolean sanitizeFieldNames) {
            doSetProperty("sanitizeFieldNames", sanitizeFieldNames);
            return this;
        }
        /**
         * Whether field names will be sanitized to Avro naming conventions.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param sanitizeFieldNames the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder sanitizeFieldNames(
                String sanitizeFieldNames) {
            doSetProperty("sanitizeFieldNames", sanitizeFieldNames);
            return this;
        }
        /**
         * The name of the data collection that is used to send signals/commands
         * to Debezium. Signaling is disabled when not set.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param signalDataCollection the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder signalDataCollection(
                String signalDataCollection) {
            doSetProperty("signalDataCollection", signalDataCollection);
            return this;
        }
        /**
         * The comma-separated list of operations to skip during streaming,
         * defined as: 'c' for inserts/create; 'u' for updates; 'd' for deletes.
         * By default, no operations will be skipped.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param skippedOperations the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder skippedOperations(
                String skippedOperations) {
            doSetProperty("skippedOperations", skippedOperations);
            return this;
        }
        /**
         * This property contains a comma-separated list of ., for which the
         * initial snapshot may be a subset of data present in the data source.
         * The subset would be defined by mongodb filter query specified as
         * value for property snapshot.collection.filter.override..
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param snapshotCollectionFilterOverrides the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotCollectionFilterOverrides(
                String snapshotCollectionFilterOverrides) {
            doSetProperty("snapshotCollectionFilterOverrides", snapshotCollectionFilterOverrides);
            return this;
        }
        /**
         * A delay period before a snapshot will begin, given in milliseconds.
         * Defaults to 0 ms.
         *
         * The option is a: long type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param snapshotDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotDelayMs(
                long snapshotDelayMs) {
            doSetProperty("snapshotDelayMs", snapshotDelayMs);
            return this;
        }
        /**
         * A delay period before a snapshot will begin, given in milliseconds.
         * Defaults to 0 ms.
         *
         * The option will be converted to a long type.
         *
         * Default: 0ms
         * Group: mongodb
         *
         * @param snapshotDelayMs the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotDelayMs(
                String snapshotDelayMs) {
            doSetProperty("snapshotDelayMs", snapshotDelayMs);
            return this;
        }
        /**
         * The maximum number of records that should be loaded into memory while
         * performing a snapshot.
         *
         * The option is a: int type.
         *
         * Group: mongodb
         *
         * @param snapshotFetchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotFetchSize(
                int snapshotFetchSize) {
            doSetProperty("snapshotFetchSize", snapshotFetchSize);
            return this;
        }
        /**
         * The maximum number of records that should be loaded into memory while
         * performing a snapshot.
         *
         * The option will be converted to a int type.
         *
         * Group: mongodb
         *
         * @param snapshotFetchSize the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotFetchSize(
                String snapshotFetchSize) {
            doSetProperty("snapshotFetchSize", snapshotFetchSize);
            return this;
        }
        /**
         * this setting must be set to specify a list of tables/collections
         * whose snapshot must be taken on creating or restarting the connector.
         *
         * The option is a: java.lang.String type.
         *
         * Group: mongodb
         *
         * @param snapshotIncludeCollectionList the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotIncludeCollectionList(
                String snapshotIncludeCollectionList) {
            doSetProperty("snapshotIncludeCollectionList", snapshotIncludeCollectionList);
            return this;
        }
        /**
         * The maximum number of threads used to perform the snapshot. Defaults
         * to 1.
         *
         * The option is a: int type.
         *
         * Default: 1
         * Group: mongodb
         *
         * @param snapshotMaxThreads the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotMaxThreads(
                int snapshotMaxThreads) {
            doSetProperty("snapshotMaxThreads", snapshotMaxThreads);
            return this;
        }
        /**
         * The maximum number of threads used to perform the snapshot. Defaults
         * to 1.
         *
         * The option will be converted to a int type.
         *
         * Default: 1
         * Group: mongodb
         *
         * @param snapshotMaxThreads the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotMaxThreads(
                String snapshotMaxThreads) {
            doSetProperty("snapshotMaxThreads", snapshotMaxThreads);
            return this;
        }
        /**
         * The criteria for running a snapshot upon startup of the connector.
         * Options include: 'initial' (the default) to specify the connector
         * should always perform an initial sync when required; 'never' to
         * specify the connector should never perform an initial sync.
         *
         * The option is a: java.lang.String type.
         *
         * Default: initial
         * Group: mongodb
         *
         * @param snapshotMode the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder snapshotMode(String snapshotMode) {
            doSetProperty("snapshotMode", snapshotMode);
            return this;
        }
        /**
         * A version of the format of the publicly visible source part in the
         * message.
         *
         * The option is a: java.lang.String type.
         *
         * Default: v2
         * Group: mongodb
         *
         * @param sourceStructVersion the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder sourceStructVersion(
                String sourceStructVersion) {
            doSetProperty("sourceStructVersion", sourceStructVersion);
            return this;
        }
        /**
         * Whether delete operations should be represented by a delete event and
         * a subsquenttombstone event (true) or only by a delete event (false).
         * Emitting the tombstone event (the default behavior) allows Kafka to
         * completely delete all events pertaining to the given key once the
         * source record got deleted.
         *
         * The option is a: boolean type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param tombstonesOnDelete the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder tombstonesOnDelete(
                boolean tombstonesOnDelete) {
            doSetProperty("tombstonesOnDelete", tombstonesOnDelete);
            return this;
        }
        /**
         * Whether delete operations should be represented by a delete event and
         * a subsquenttombstone event (true) or only by a delete event (false).
         * Emitting the tombstone event (the default behavior) allows Kafka to
         * completely delete all events pertaining to the given key once the
         * source record got deleted.
         *
         * The option will be converted to a boolean
         * type.
         *
         * Default: false
         * Group: mongodb
         *
         * @param tombstonesOnDelete the value to set
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder tombstonesOnDelete(
                String tombstonesOnDelete) {
            doSetProperty("tombstonesOnDelete", tombstonesOnDelete);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint for the Debezium MongoDB Connector
     * component.
     */
    public interface AdvancedDebeziumMongodbEndpointBuilder
            extends
                EndpointConsumerBuilder {
        default DebeziumMongodbEndpointBuilder basic() {
            return (DebeziumMongodbEndpointBuilder) this;
        }
        /**
         * To let the consumer use a custom ExceptionHandler. Notice if the
         * option bridgeErrorHandler is enabled then this option is not in use.
         * By default the consumer will deal with exceptions, that will be
         * logged at WARN or ERROR level and ignored.
         *
         * The option is a:
         * org.apache.camel.spi.ExceptionHandler type.
         *
         * Group: consumer (advanced)
         *
         * @param exceptionHandler the value to set
         * @return the dsl builder
         */
        default AdvancedDebeziumMongodbEndpointBuilder exceptionHandler(
                ExceptionHandler exceptionHandler) {
            doSetProperty("exceptionHandler", exceptionHandler);
            return this;
        }
        /**
         * To let the consumer use a custom ExceptionHandler. Notice if the
         * option bridgeErrorHandler is enabled then this option is not in use.
         * By default the consumer will deal with exceptions, that will be
         * logged at WARN or ERROR level and ignored.
         *
         * The option will be converted to a
         * org.apache.camel.spi.ExceptionHandler type.
         *
         * Group: consumer (advanced)
         *
         * @param exceptionHandler the value to set
         * @return the dsl builder
         */
        default AdvancedDebeziumMongodbEndpointBuilder exceptionHandler(
                String exceptionHandler) {
            doSetProperty("exceptionHandler", exceptionHandler);
            return this;
        }
        /**
         * Sets the exchange pattern when the consumer creates an exchange.
         *
         * The option is a:
         * org.apache.camel.ExchangePattern type.
         *
         * Group: consumer (advanced)
         *
         * @param exchangePattern the value to set
         * @return the dsl builder
         */
        default AdvancedDebeziumMongodbEndpointBuilder exchangePattern(
                ExchangePattern exchangePattern) {
            doSetProperty("exchangePattern", exchangePattern);
            return this;
        }
        /**
         * Sets the exchange pattern when the consumer creates an exchange.
         *
         * The option will be converted to a
         * org.apache.camel.ExchangePattern type.
         *
         * Group: consumer (advanced)
         *
         * @param exchangePattern the value to set
         * @return the dsl builder
         */
        default AdvancedDebeziumMongodbEndpointBuilder exchangePattern(
                String exchangePattern) {
            doSetProperty("exchangePattern", exchangePattern);
            return this;
        }
    }

    public interface DebeziumMongodbBuilders {
        /**
         * Debezium MongoDB Connector (camel-debezium-mongodb)
         * Capture changes from a MongoDB database.
         *
         * Category: database,nosql
         * Since: 3.0
         * Maven coordinates: org.apache.camel:camel-debezium-mongodb
         *
         * Syntax: debezium-mongodb:name
         *
         * Path parameter: name (required)
         * Unique name for the connector. Attempting to register again with the
         * same name will fail.
         *
         * @param path name
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder debeziumMongodb(String path) {
            return DebeziumMongodbEndpointBuilderFactory.endpointBuilder("debezium-mongodb", path);
        }
        /**
         * Debezium MongoDB Connector (camel-debezium-mongodb)
         * Capture changes from a MongoDB database.
         *
         * Category: database,nosql
         * Since: 3.0
         * Maven coordinates: org.apache.camel:camel-debezium-mongodb
         *
         * Syntax: debezium-mongodb:name
         *
         * Path parameter: name (required)
         * Unique name for the connector. Attempting to register again with the
         * same name will fail.
         *
         * @param componentName to use a custom component name for the endpoint
         * instead of the default name
         * @param path name
         * @return the dsl builder
         */
        default DebeziumMongodbEndpointBuilder debeziumMongodb(
                String componentName,
                String path) {
            return DebeziumMongodbEndpointBuilderFactory.endpointBuilder(componentName, path);
        }
    }
    static DebeziumMongodbEndpointBuilder endpointBuilder(
            String componentName,
            String path) {
        class DebeziumMongodbEndpointBuilderImpl extends AbstractEndpointBuilder implements DebeziumMongodbEndpointBuilder, AdvancedDebeziumMongodbEndpointBuilder {
            public DebeziumMongodbEndpointBuilderImpl(String path) {
                super(componentName, path);
            }
        }
        return new DebeziumMongodbEndpointBuilderImpl(path);
    }
}


text:
layout: post
title:  Boostcamp ngày chủ nhật
date:   2016-12-25 03:43:45 +0700
categories: [ruby]
---

**Bitcoin JSON RPC**

Setup một bitcoin server local để viêt exchange bitcoin web app.

```bash
sudo add-apt-repository ppa:bitcoin/bitcoin

sudo apt-get update

sudo apt-get install bitcoind -y
```

```
cd ~/.bitcoin
```
Tạo một file config có tên sau : bincoin.conf

```bash
prune=600

maxconnections=12

maxuploadtarget=20

rpcuser=btnuser

rpcpassword=btnpassword

daemon=1

keypool=10000

rpcport=8392
```

```
reboot

bitcoind
```

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

```
bitcoin-cli <method>
```

Sau khi đã dùng được cli, ta tiến hành chọn một ruby gem để hỗ trợ call api từ server

```
bitcoin-client
```

Tạo một rails app, install vào và bắt đầu sữ dụng
https://github.com/sinisterchipmunk/bitcoin-client