text:
/**
 * @file core_pkcs11_config.h
 * @brief PCKS#11 config options.
 */
#ifndef _CORE_PKCS11_CONFIG_H_
#define _CORE_PKCS11_CONFIG_H_

/**************************************************/
/******* DO NOT CHANGE the following order ********/
/**************************************************/

/* Include logging header files and define logging macros in the following order:
 * 1. Include the header file "logging_levels.h".
 * 2. Define the LIBRARY_LOG_NAME and LIBRARY_LOG_LEVEL macros depending on
 * the logging configuration for PKCS #11.
 * 3. Include the header file "logging_stack.h", if logging is enabled for PKCS #11.
 */

#include "logging_levels.h"

/* Logging configuration for the PKCS #11 library. */
#ifndef LIBRARY_LOG_NAME
    #define LIBRARY_LOG_NAME    "PKCS11"
#endif

#ifndef LIBRARY_LOG_LEVEL
    #define LIBRARY_LOG_LEVEL    LOG_INFO
#endif

#include "logging_stack.h"

/************ End of logging configuration ****************/

#include <stdlib.h>

/**
 * @brief Malloc API used by core_pkcs11.h
 */
#define pkcs11configPKCS11_MALLOC                          malloc

/**
 * @brief Free API used by core_pkcs11.h
 */
#define pkcs11configPKCS11_FREE                            free

/**
 * @brief PKCS #11 default user PIN.
 *
 * The PKCS #11 standard specifies the presence of a user PIN. That feature is
 * sensible for applications that have an interactive user interface and memory
 * protections. However, since typical microcontroller applications lack one or
 * both of those, the user PIN is assumed to be used herein for interoperability
 * purposes only, and not as a security feature.
 *
 * Note: Do not cast this to a pointer! The library calls sizeof to get the length
 * of this string.
 */
#define pkcs11configPKCS11_DEFAULT_USER_PIN                "0000"

/**
 * @brief Maximum length (in characters) for a PKCS #11 CKA_LABEL
 * attribute.
 */
#define pkcs11configMAX_LABEL_LENGTH                       32UL

/**
 * @brief Maximum number of token objects that can be stored
 * by the PKCS #11 module.
 */
#define pkcs11configMAX_NUM_OBJECTS                        6

/**
 * @brief Maximum number of sessions that can be stored
 * by the PKCS #11 module.
 */
#define pkcs11configMAX_SESSIONS                           10

/**
 * @brief Set to 1 if a PAL destroy object is implemented.
 *
 * If set to 0, no PAL destroy object is implemented, and this functionality
 * is implemented in the common PKCS #11 layer.
 */
#define pkcs11configPAL_DESTROY_SUPPORTED                  0

/**
 * @brief Set to 1 if OTA image verification via PKCS #11 module is supported.
 *
 * If set to 0, OTA code signing certificate is built in via
 * aws_ota_codesigner_certificate.h.
 */
#define pkcs11configOTA_SUPPORTED                          0

/**
 * @brief Set to 1 if PAL supports storage for JITP certificate,
 * code verify certificate, and trusted server root certificate.
 *
 * If set to 0, PAL does not support storage mechanism for these, and
 * they are accessed via headers compiled into the code.
 */
#define pkcs11configJITP_CODEVERIFY_ROOT_CERT_SUPPORTED    0

/**
 * @brief The PKCS #11 label for device private key.
 *
 * Private key for connection to AWS IoT endpoint.  The corresponding
 * public key should be registered with the AWS IoT endpoint.
 */
#define pkcs11configLABEL_DEVICE_PRIVATE_KEY_FOR_TLS       "Device Priv TLS Key"

/**
 * @brief The PKCS #11 label for device public key.
 *
 * The public key corresponding to pkcs11configLABEL_DEVICE_PRIVATE_KEY_FOR_TLS.
 */
#define pkcs11configLABEL_DEVICE_PUBLIC_KEY_FOR_TLS        "Device Pub TLS Key"

/**
 * @brief The PKCS #11 label for the device certificate.
 *
 * Device certificate corresponding to pkcs11configLABEL_DEVICE_PRIVATE_KEY_FOR_TLS.
 */
#define pkcs11configLABEL_DEVICE_CERTIFICATE_FOR_TLS       "Device Cert"

/**
 * @brief The PKCS #11 label for the object to be used for HMAC operations.
 */
#define pkcs11configLABEL_HMAC_KEY                         "HMAC Key"

/**
 * @brief The PKCS #11 label for the object to be used for CMAC operations.
 */
#define pkcs11configLABEL_CMAC_KEY                         "CMAC Key"

/**
 * @brief The PKCS #11 label for the object to be used for code verification.
 *
 * Used by over-the-air update code to verify an incoming signed image.
 */
#define pkcs11configLABEL_CODE_VERIFICATION_KEY            "Code Verify Key"

/**
 * @brief The PKCS #11 label for the claim certificate for Fleet Provisioning.
 */
#define pkcs11configLABEL_CLAIM_CERTIFICATE                "Claim Cert"

/**
 * @brief The PKCS #11 label for the claim private key for Fleet Provisioning.
 */
#define pkcs11configLABEL_CLAIM_PRIVATE_KEY                "Claim Key"

/**
 * @brief The PKCS #11 label for Just-In-Time-Provisioning.
 *
 * The certificate corresponding to the issuer of the device certificate
 * (pkcs11configLABEL_DEVICE_CERTIFICATE_FOR_TLS) when using the JITR or
 * JITP flow.
 */
#define pkcs11configLABEL_JITP_CERTIFICATE                 "JITP Cert"

/**
 * @brief The PKCS #11 label for the AWS Trusted Root Certificate.
 *
 * @see aws_default_root_certificates.h
 */
#define pkcs11configLABEL_ROOT_CERTIFICATE                 "Root Cert"

#endif /* _CORE_PKCS11_CONFIG_H_ */


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

<title>org.drip.regression.fixedpointfinder</title>
<meta name="date" content="2013-02-01">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.drip.regression.fixedpointfinder

Class Summary

Class
Description

BracketingRegressorSet

This sample implements the regression analysis set for the Bracketing Fixed Point Search Method.

CompoundBracketingRegressorSet

This sample implements the regression analysis set for the Compound Bracketing Fixed Point Search Methods.

FixedPointFinderRegressionEngine

FixedPointFinderRegressionEngine implements the RegressionEngine class for FixedPointFinder functionality.

OpenRegressorSet

This sample implements the regression analysis set for the Open (i.e., Newton) Fixed Point Search Method.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

redpajama_set_name: RedPajamaGithub


text:
using System.Collections.Generic;

namespace ChopShop.Model
{
    public class Product : Entity
    {
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual string Sku { get; set; }
        public virtual ICollection<Price> Prices { get; set; }
        public virtual bool IsDeleted { get; set; }
        public virtual int Quantity { get; set; }
        public virtual ICollection<Category> Categories { get; set; }
        public virtual ICollection<Image> Images { get; set; }
    }
}


text:
<!doctype html>

<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<title>to-markdown - an HTML to Markdown converter written in javascript</title>
<link rel="stylesheet" href="bower_components/normalize.css/normalize.css"></link>

to-markdown

    Source on GitHub

      <input type="checkbox" id="gfm"> GitHub Flavored Markdown

HTML

      <textarea id="input" cols="100" rows="10">

I was struggling with this because I was configuring my http_proxy, https_proxy and ftp_proxy using export but when I was doing sudo apt-get udpate, nothing happened. Did some research on StackOverflow and found the solution. So I'm keeping the solution here for future reference. This problem happens because in some releases sudo is configured in such a way that all environment variables all cleared when running the command.

My proxy don't have authentication so I did:

export http_proxy="http://proxy.servername:port/"

export https_proxy="http://proxy.servername:port/"

export ftp_proxy="http://proxy.servername:port/"

After that I did:

visudo

There is a line that states:

Defaults env_reset

After that line just add:

Defaults env_keep = "http_proxy https_proxy ftp_proxy"

Voilá. Things will start working now.

	</textarea>

Markdown

      <textarea readonly id="output"></textarea>

to-markdown is copyright © 2011-15 Dom Christie and is released under the MIT licence.


text:
function h = exp_head(x)
% Get the head (=function label) of any expression.
% Head = exp_head(Expression)
%
% In:
%   Expression  : any expression
%
% Out:
%   Head : The head of the expression, again an expression. An expression written as
%          f(x,y,z) has f as its head (though the data structure by which the expression is
%          represented in MATLAB is a (canonical expression) struct). Since {x,y,z} and 10.3 are
%          also expressions, their head can be obtained, too.
%           * the head of a canonical expression struct s is s.head
%           * the head of an impure expression struct s is the head of s.tracking.expression.
%           * the head of a native MATLAB data structure depends on the data type:
%             - scalar number: @Number
%             - single-row char array: @String
%             - function_handle: @Symbol
%             - anything else: @Value (this is a catch-all, which may later be further refined into
%                              things like @Struct, etc.)
%
% See also:
%   exp_part, exp_parts, exp_eval, exp_eval_optimized
%
%                                Christian Kothe, Swartz Center for Computational Neuroscience, UCSD
%                                2010-04-19

while isfield(x,'tracking') && isfield(x.tracking,'expression')
    x = x.tracking.expression; end

if isfield(x,'head')
    % structure with fields .head & .parts, as created by most of the expression machinery
    h = x.head;
elseif isa(x,'function_handle')
    % all functions are considered symbols, even though some of them may be lambda functions
    h = @Symbol;
elseif ischar(x) && size(x,1) == 1
    % regular strings; Nd char arrays are currently reflected as Value (rather than
    % List(String(...), String(...), ...))
    h = @String;
elseif isnumeric(x) && isscalar(x)
    % regular numbers; matrices are currently reflected as Value (rather than
    % List(List(Number, Number, ...), ...))
    h = @Number;
else
    % generic value
    h = @Value;
end


text:
<?php if ( is_active_sidebar( 'secondary' ) ) : // Check, if secondary sidebar at least has one widget and on secondary page. ?>
	<div id="secondary-sidebar" class="widget-area widget-secondary" aria-label="<?php echo esc_attr_x( 'Secondary Sidebar', 'Sidebar aria label', 'delivery' ); ?>" <?php hybrid_attr( 'sidebar', 'secondary' ); ?>>
		<?php dynamic_sidebar( 'secondary' ); ?>
	</div><!-- #secondary-sidebar -->
<?php endif; ?>


text:
ProjectSync
===========

Helps to keep multiple Visual Studio projects that link to the same source files in sync. If you answer yes to the following questions, then this project is for you.

- Do you work on a library project that targets multiple versions of the .NET Framework?
- Does your solution have multiple copies of the projects for each framework with the same files linked into each?
- Do you have trouble keeping those projects in sync?
- Do you hate adding new files to a project because you have to add them to all the others?


text:
/**
 * @class
 * Initializes a new instance of the Sku class.
 * @constructor
 * Sku parameters supplied to the create redis operation.
 * @member {string} name What type of redis cache to deploy. Valid values:
 * (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard',
 * 'Premium'
 *
 * @member {string} family Which family to use. Valid values: (C, P). Possible
 * values include: 'C', 'P'
 *
 * @member {number} capacity What size of redis cache to deploy. Valid values:
 * for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)
 *
 */
export interface Sku {
    name: string;
    family: string;
    capacity: number;
}

/**
 * @class
 * Initializes a new instance of the Resource class.
 * @constructor
 * @member {string} [id] Resource Id
 *
 * @member {string} [name] Resource name
 *
 * @member {string} [type] Resource type
 *
 * @member {string} location Resource location
 *
 * @member {object} [tags] Resource tags
 *
 */
export interface Resource extends BaseResource {
    id?: string;
    name?: string;
    type?: string;
    location: string;
    tags?: { [propertyName: string]: string };
}

/**
 * @class
 * Initializes a new instance of the RedisCreateOrUpdateParameters class.
 * @constructor
 * Parameters supplied to the CreateOrUpdate Redis operation.
 * @member {string} [redisVersion] RedisVersion parameter has been deprecated.
 * As such, it is no longer necessary to provide this parameter and any value
 * specified is ignored.
 *
 * @member {object} sku What sku of redis cache to deploy.
 *
 * @member {string} [sku.name] What type of redis cache to deploy. Valid
 * values: (Basic, Standard, Premium). Possible values include: 'Basic',
 * 'Standard', 'Premium'
 *
 * @member {string} [sku.family] Which family to use. Valid values: (C, P).
 * Possible values include: 'C', 'P'
 *
 * @member {number} [sku.capacity] What size of redis cache to deploy. Valid
 * values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)
 *
 * @member {object} [redisConfiguration] All Redis Settings. Few possible
 * keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
 * etc.
 *
 * @member {boolean} [enableNonSslPort] If the value is true, then the non-ssl
 * redis server port (6379) will be enabled.
 *
 * @member {object} [tenantSettings] tenantSettings
 *
 * @member {number} [shardCount] The number of shards to be created on a
 * Premium Cluster Cache.
 *
 * @member {string} [virtualNetwork] The exact ARM resource ID of the virtual
 * network to deploy the redis cache in. Example format:
 * /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.ClassicNetwork/VirtualNetworks/vnet1
 *
 * @member {string} [subnet] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 * @member {string} [staticIP] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 */
export interface RedisCreateOrUpdateParameters extends Resource {
    redisVersion?: string;
    sku: Sku;
    redisConfiguration?: { [propertyName: string]: string };
    enableNonSslPort?: boolean;
    tenantSettings?: { [propertyName: string]: string };
    shardCount?: number;
    virtualNetwork?: string;
    subnet?: string;
    staticIP?: string;
}

/**
 * @class
 * Initializes a new instance of the RedisAccessKeys class.
 * @constructor
 * Redis cache access keys.
 * @member {string} [primaryKey] The current primary key that clients can use
 * to authenticate with redis cache.
 *
 * @member {string} [secondaryKey] The current secondary key that clients can
 * use to authenticate with redis cache.
 *
 */
export interface RedisAccessKeys {
    primaryKey?: string;
    secondaryKey?: string;
}

/**
 * @class
 * Initializes a new instance of the RedisResourceWithAccessKey class.
 * @constructor
 * A redis item in CreateOrUpdate Operation response.
 * @member {object} [accessKeys] Redis cache access keys.
 *
 * @member {string} [accessKeys.primaryKey] The current primary key that
 * clients can use to authenticate with redis cache.
 *
 * @member {string} [accessKeys.secondaryKey] The current secondary key that
 * clients can use to authenticate with redis cache.
 *
 * @member {string} [provisioningState] Redis instance provisioning status
 *
 * @member {string} [hostName] Redis host name
 *
 * @member {number} [port] Redis non-ssl port
 *
 * @member {number} [sslPort] Redis ssl port
 *
 * @member {string} [redisVersion] RedisVersion parameter has been deprecated.
 * As such, it is no longer necessary to provide this parameter and any value
 * specified is ignored.
 *
 * @member {object} sku What sku of redis cache to deploy.
 *
 * @member {string} [sku.name] What type of redis cache to deploy. Valid
 * values: (Basic, Standard, Premium). Possible values include: 'Basic',
 * 'Standard', 'Premium'
 *
 * @member {string} [sku.family] Which family to use. Valid values: (C, P).
 * Possible values include: 'C', 'P'
 *
 * @member {number} [sku.capacity] What size of redis cache to deploy. Valid
 * values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)
 *
 * @member {object} [redisConfiguration] All Redis Settings. Few possible
 * keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
 * etc.
 *
 * @member {boolean} [enableNonSslPort] If the value is true, then the non-ssl
 * redis server port (6379) will be enabled.
 *
 * @member {object} [tenantSettings] tenantSettings
 *
 * @member {number} [shardCount] The number of shards to be created on a
 * Premium Cluster Cache.
 *
 * @member {string} [virtualNetwork] The exact ARM resource ID of the virtual
 * network to deploy the redis cache in. Example format:
 * /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.ClassicNetwork/VirtualNetworks/vnet1
 *
 * @member {string} [subnet] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 * @member {string} [staticIP] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 */
export interface RedisResourceWithAccessKey extends Resource {
    accessKeys?: RedisAccessKeys;
    provisioningState?: string;
    hostName?: string;
    port?: number;
    sslPort?: number;
    redisVersion?: string;
    sku: Sku;
    redisConfiguration?: { [propertyName: string]: string };
    enableNonSslPort?: boolean;
    tenantSettings?: { [propertyName: string]: string };
    shardCount?: number;
    virtualNetwork?: string;
    subnet?: string;
    staticIP?: string;
}

/**
 * @class
 * Initializes a new instance of the RedisResource class.
 * @constructor
 * A single redis item in List or Get Operation.
 * @member {string} [provisioningState] Redis instance provisioning status
 *
 * @member {string} [hostName] Redis host name
 *
 * @member {number} [port] Redis non-ssl port
 *
 * @member {number} [sslPort] Redis ssl port
 *
 * @member {string} [redisVersion] RedisVersion parameter has been deprecated.
 * As such, it is no longer necessary to provide this parameter and any value
 * specified is ignored.
 *
 * @member {object} sku What sku of redis cache to deploy.
 *
 * @member {string} [sku.name] What type of redis cache to deploy. Valid
 * values: (Basic, Standard, Premium). Possible values include: 'Basic',
 * 'Standard', 'Premium'
 *
 * @member {string} [sku.family] Which family to use. Valid values: (C, P).
 * Possible values include: 'C', 'P'
 *
 * @member {number} [sku.capacity] What size of redis cache to deploy. Valid
 * values: for C family (0, 1, 2, 3, 4, 5, 6), for P family (1, 2, 3, 4)
 *
 * @member {object} [redisConfiguration] All Redis Settings. Few possible
 * keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
 * etc.
 *
 * @member {boolean} [enableNonSslPort] If the value is true, then the non-ssl
 * redis server port (6379) will be enabled.
 *
 * @member {object} [tenantSettings] tenantSettings
 *
 * @member {number} [shardCount] The number of shards to be created on a
 * Premium Cluster Cache.
 *
 * @member {string} [virtualNetwork] The exact ARM resource ID of the virtual
 * network to deploy the redis cache in. Example format:
 * /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.ClassicNetwork/VirtualNetworks/vnet1
 *
 * @member {string} [subnet] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 * @member {string} [staticIP] Required when deploying a redis cache inside an
 * existing Azure Virtual Network.
 *
 */
export interface RedisResource extends Resource {
    provisioningState?: string;
    hostName?: string;
    port?: number;
    sslPort?: number;
    redisVersion?: string;
    sku: Sku;
    redisConfiguration?: { [propertyName: string]: string };
    enableNonSslPort?: boolean;
    tenantSettings?: { [propertyName: string]: string };
    shardCount?: number;
    virtualNetwork?: string;
    subnet?: string;
    staticIP?: string;
}

/**
 * @class
 * Initializes a new instance of the RedisListKeysResult class.
 * @constructor
 * The response of redis list keys operation.
 * @member {string} [primaryKey] The current primary key that clients can use
 * to authenticate with redis cache.
 *
 * @member {string} [secondaryKey] The current secondary key that clients can
 * use to authenticate with redis cache.
 *
 */
export interface RedisListKeysResult {
    primaryKey?: string;
    secondaryKey?: string;
}

/**
 * @class
 * Initializes a new instance of the RedisRegenerateKeyParameters class.
 * @constructor
 * Specifies which redis access keys to reset.
 * @member {string} keyType Which redis access key to reset. Possible values
 * include: 'Primary', 'Secondary'
 *
 */
export interface RedisRegenerateKeyParameters {
    keyType: string;
}

/**
 * @class
 * Initializes a new instance of the SubResource class.
 * @constructor
 * @member {string} [id] Resource Id
 *
 */
export interface SubResource extends BaseResource {
    id?: string;
}


text:
package com.microsoft.azure.management.logic.v2016_06_01.implementation;

import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
import com.microsoft.azure.management.logic.v2016_06_01.SetTriggerStateActionDefinition;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.RestException;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.Validator;
import java.io.IOException;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Path;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;

/**
 * An instance of this class provides access to all the operations defined
 * in WorkflowTriggers.
 */
public class WorkflowTriggersInner {
    /** The Retrofit service to perform REST calls. */
    private WorkflowTriggersService service;
    /** The service client containing this operation class. */
    private LogicManagementClientImpl client;

    /**
     * Initializes an instance of WorkflowTriggersInner.
     *
     * @param retrofit the Retrofit instance built from a Retrofit Builder.
     * @param client the instance of the service client containing this operation class.
     */
    public WorkflowTriggersInner(Retrofit retrofit, LogicManagementClientImpl client) {
        this.service = retrofit.create(WorkflowTriggersService.class);
        this.client = client;
    }

    /**
     * The interface defining all the services for WorkflowTriggers to be
     * used by Retrofit to perform actually REST calls.
     */
    interface WorkflowTriggersService {
        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers list" })
        @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/")
        Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Query("api-version") String apiVersion, @Query("$top") Integer top, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers get" })
        @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}")
        Observable<Response<ResponseBody>> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers reset" })
        @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset")
        Observable<Response<ResponseBody>> reset(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers run" })
        @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run")
        Observable<Response<ResponseBody>> run(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers getSchemaJson" })
        @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json")
        Observable<Response<ResponseBody>> getSchemaJson(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers setState" })
        @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState")
        Observable<Response<ResponseBody>> setState(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SetTriggerStateActionDefinition setState, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers listCallbackUrl" })
        @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl")
        Observable<Response<ResponseBody>> listCallbackUrl(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workflowName") String workflowName, @Path("triggerName") String triggerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

        @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.logic.v2016_06_01.WorkflowTriggers listNext" })
        @GET
        Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the PagedList<WorkflowTriggerInner> object if successful.
     */
    public PagedList<WorkflowTriggerInner> list(final String resourceGroupName, final String workflowName) {
        ServiceResponse<Page<WorkflowTriggerInner>> response = listSinglePageAsync(resourceGroupName, workflowName).toBlocking().single();
        return new PagedList<WorkflowTriggerInner>(response.body()) {
            @Override
            public Page<WorkflowTriggerInner> nextPage(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
            }
        };
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<List<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName, final ListOperationCallback<WorkflowTriggerInner> serviceCallback) {
        return AzureServiceFuture.fromPageResponse(
            listSinglePageAsync(resourceGroupName, workflowName),
            new Func1<String, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(String nextPageLink) {
                    return listNextSinglePageAsync(nextPageLink);
                }
            },
            serviceCallback);
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<Page<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName) {
        return listWithServiceResponseAsync(resourceGroupName, workflowName)
            .map(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Page<WorkflowTriggerInner>>() {
                @Override
                public Page<WorkflowTriggerInner> call(ServiceResponse<Page<WorkflowTriggerInner>> response) {
                    return response.body();
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName) {
        return listSinglePageAsync(resourceGroupName, workflowName)
            .concatMap(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(ServiceResponse<Page<WorkflowTriggerInner>> page) {
                    String nextPageLink = page.body().nextPageLink();
                    if (nextPageLink == null) {
                        return Observable.just(page);
                    }
                    return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful.
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listSinglePageAsync(final String resourceGroupName, final String workflowName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        final Integer top = null;
        final String filter = null;
        return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<PageImpl<WorkflowTriggerInner>> result = listDelegate(response);
                        return Observable.just(new ServiceResponse<Page<WorkflowTriggerInner>>(result.body(), result.response()));
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param top The number of items to be included in the result.
     * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the PagedList<WorkflowTriggerInner> object if successful.
     */
    public PagedList<WorkflowTriggerInner> list(final String resourceGroupName, final String workflowName, final Integer top, final String filter) {
        ServiceResponse<Page<WorkflowTriggerInner>> response = listSinglePageAsync(resourceGroupName, workflowName, top, filter).toBlocking().single();
        return new PagedList<WorkflowTriggerInner>(response.body()) {
            @Override
            public Page<WorkflowTriggerInner> nextPage(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
            }
        };
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param top The number of items to be included in the result.
     * @param filter The filter to apply on the operation.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<List<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter, final ListOperationCallback<WorkflowTriggerInner> serviceCallback) {
        return AzureServiceFuture.fromPageResponse(
            listSinglePageAsync(resourceGroupName, workflowName, top, filter),
            new Func1<String, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(String nextPageLink) {
                    return listNextSinglePageAsync(nextPageLink);
                }
            },
            serviceCallback);
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param top The number of items to be included in the result.
     * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<Page<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) {
        return listWithServiceResponseAsync(resourceGroupName, workflowName, top, filter)
            .map(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Page<WorkflowTriggerInner>>() {
                @Override
                public Page<WorkflowTriggerInner> call(ServiceResponse<Page<WorkflowTriggerInner>> response) {
                    return response.body();
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param top The number of items to be included in the result.
     * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listWithServiceResponseAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) {
        return listSinglePageAsync(resourceGroupName, workflowName, top, filter)
            .concatMap(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(ServiceResponse<Page<WorkflowTriggerInner>> page) {
                    String nextPageLink = page.body().nextPageLink();
                    if (nextPageLink == null) {
                        return Observable.just(page);
                    }
                    return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
    ServiceResponse<PageImpl<WorkflowTriggerInner>> * @param resourceGroupName The resource group name.
    ServiceResponse<PageImpl<WorkflowTriggerInner>> * @param workflowName The workflow name.
    ServiceResponse<PageImpl<WorkflowTriggerInner>> * @param top The number of items to be included in the result.
    ServiceResponse<PageImpl<WorkflowTriggerInner>> * @param filter The filter to apply on the operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful.
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listSinglePageAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.list(this.client.subscriptionId(), resourceGroupName, workflowName, this.client.apiVersion(), top, filter, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<PageImpl<WorkflowTriggerInner>> result = listDelegate(response);
                        return Observable.just(new ServiceResponse<Page<WorkflowTriggerInner>>(result.body(), result.response()));
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<PageImpl<WorkflowTriggerInner>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<PageImpl<WorkflowTriggerInner>, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<PageImpl<WorkflowTriggerInner>>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Gets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the WorkflowTriggerInner object if successful.
     */
    public WorkflowTriggerInner get(String resourceGroupName, String workflowName, String triggerName) {
        return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body();
    }

    /**
     * Gets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<WorkflowTriggerInner> getAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback<WorkflowTriggerInner> serviceCallback) {
        return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback);
    }

    /**
     * Gets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WorkflowTriggerInner object
     */
    public Observable<WorkflowTriggerInner> getAsync(String resourceGroupName, String workflowName, String triggerName) {
        return getWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1<ServiceResponse<WorkflowTriggerInner>, WorkflowTriggerInner>() {
            @Override
            public WorkflowTriggerInner call(ServiceResponse<WorkflowTriggerInner> response) {
                return response.body();
            }
        });
    }

    /**
     * Gets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WorkflowTriggerInner object
     */
    public Observable<ServiceResponse<WorkflowTriggerInner>> getWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.get(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkflowTriggerInner>>>() {
                @Override
                public Observable<ServiceResponse<WorkflowTriggerInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<WorkflowTriggerInner> clientResponse = getDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<WorkflowTriggerInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<WorkflowTriggerInner, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<WorkflowTriggerInner>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Resets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    public void reset(String resourceGroupName, String workflowName, String triggerName) {
        resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body();
    }

    /**
     * Resets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<Void> resetAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback<Void> serviceCallback) {
        return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback);
    }

    /**
     * Resets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceResponse} object if successful.
     */
    public Observable<Void> resetAsync(String resourceGroupName, String workflowName, String triggerName) {
        return resetWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1<ServiceResponse<Void>, Void>() {
            @Override
            public Void call(ServiceResponse<Void> response) {
                return response.body();
            }
        });
    }

    /**
     * Resets a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceResponse} object if successful.
     */
    public Observable<ServiceResponse<Void>> resetWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.reset(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                @Override
                public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<Void> clientResponse = resetDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<Void> resetDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Runs a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws RestException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Object object if successful.
     */
    public Object run(String resourceGroupName, String workflowName, String triggerName) {
        return runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body();
    }

    /**
     * Runs a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<Object> runAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback<Object> serviceCallback) {
        return ServiceFuture.fromResponse(runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback);
    }

    /**
     * Runs a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Object object
     */
    public Observable<Object> runAsync(String resourceGroupName, String workflowName, String triggerName) {
        return runWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1<ServiceResponse<Object>, Object>() {
            @Override
            public Object call(ServiceResponse<Object> response) {
                return response.body();
            }
        });
    }

    /**
     * Runs a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Object object
     */
    public Observable<ServiceResponse<Object>> runWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.run(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Object>>>() {
                @Override
                public Observable<ServiceResponse<Object>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<Object> clientResponse = runDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<Object> runDelegate(Response<ResponseBody> response) throws RestException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<Object, RestException>newInstance(this.client.serializerAdapter())
                .registerError(RestException.class)
                .build(response);
    }

    /**
     * Get the trigger schema as JSON.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the JsonSchemaInner object if successful.
     */
    public JsonSchemaInner getSchemaJson(String resourceGroupName, String workflowName, String triggerName) {
        return getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body();
    }

    /**
     * Get the trigger schema as JSON.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<JsonSchemaInner> getSchemaJsonAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback<JsonSchemaInner> serviceCallback) {
        return ServiceFuture.fromResponse(getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback);
    }

    /**
     * Get the trigger schema as JSON.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the JsonSchemaInner object
     */
    public Observable<JsonSchemaInner> getSchemaJsonAsync(String resourceGroupName, String workflowName, String triggerName) {
        return getSchemaJsonWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1<ServiceResponse<JsonSchemaInner>, JsonSchemaInner>() {
            @Override
            public JsonSchemaInner call(ServiceResponse<JsonSchemaInner> response) {
                return response.body();
            }
        });
    }

    /**
     * Get the trigger schema as JSON.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the JsonSchemaInner object
     */
    public Observable<ServiceResponse<JsonSchemaInner>> getSchemaJsonWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.getSchemaJson(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<JsonSchemaInner>>>() {
                @Override
                public Observable<ServiceResponse<JsonSchemaInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<JsonSchemaInner> clientResponse = getSchemaJsonDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<JsonSchemaInner> getSchemaJsonDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<JsonSchemaInner, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<JsonSchemaInner>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Sets the state of a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param source the WorkflowTriggerInner value
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    public void setState(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) {
        setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source).toBlocking().single().body();
    }

    /**
     * Sets the state of a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param source the WorkflowTriggerInner value
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<Void> setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source, final ServiceCallback<Void> serviceCallback) {
        return ServiceFuture.fromResponse(setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source), serviceCallback);
    }

    /**
     * Sets the state of a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param source the WorkflowTriggerInner value
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceResponse} object if successful.
     */
    public Observable<Void> setStateAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) {
        return setStateWithServiceResponseAsync(resourceGroupName, workflowName, triggerName, source).map(new Func1<ServiceResponse<Void>, Void>() {
            @Override
            public Void call(ServiceResponse<Void> response) {
                return response.body();
            }
        });
    }

    /**
     * Sets the state of a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param source the WorkflowTriggerInner value
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceResponse} object if successful.
     */
    public Observable<ServiceResponse<Void>> setStateWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName, WorkflowTriggerInner source) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        if (source == null) {
            throw new IllegalArgumentException("Parameter source is required and cannot be null.");
        }
        Validator.validate(source);
        SetTriggerStateActionDefinition setState = new SetTriggerStateActionDefinition();
        setState.withSource(source);
        return service.setState(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), setState, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                @Override
                public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<Void> clientResponse = setStateDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<Void> setStateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<Void>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Get the callback URL for a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the WorkflowTriggerCallbackUrlInner object if successful.
     */
    public WorkflowTriggerCallbackUrlInner listCallbackUrl(String resourceGroupName, String workflowName, String triggerName) {
        return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).toBlocking().single().body();
    }

    /**
     * Get the callback URL for a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<WorkflowTriggerCallbackUrlInner> listCallbackUrlAsync(String resourceGroupName, String workflowName, String triggerName, final ServiceCallback<WorkflowTriggerCallbackUrlInner> serviceCallback) {
        return ServiceFuture.fromResponse(listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName), serviceCallback);
    }

    /**
     * Get the callback URL for a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WorkflowTriggerCallbackUrlInner object
     */
    public Observable<WorkflowTriggerCallbackUrlInner> listCallbackUrlAsync(String resourceGroupName, String workflowName, String triggerName) {
        return listCallbackUrlWithServiceResponseAsync(resourceGroupName, workflowName, triggerName).map(new Func1<ServiceResponse<WorkflowTriggerCallbackUrlInner>, WorkflowTriggerCallbackUrlInner>() {
            @Override
            public WorkflowTriggerCallbackUrlInner call(ServiceResponse<WorkflowTriggerCallbackUrlInner> response) {
                return response.body();
            }
        });
    }

    /**
     * Get the callback URL for a workflow trigger.
     *
     * @param resourceGroupName The resource group name.
     * @param workflowName The workflow name.
     * @param triggerName The workflow trigger name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WorkflowTriggerCallbackUrlInner object
     */
    public Observable<ServiceResponse<WorkflowTriggerCallbackUrlInner>> listCallbackUrlWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (workflowName == null) {
            throw new IllegalArgumentException("Parameter workflowName is required and cannot be null.");
        }
        if (triggerName == null) {
            throw new IllegalArgumentException("Parameter triggerName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        return service.listCallbackUrl(this.client.subscriptionId(), resourceGroupName, workflowName, triggerName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<WorkflowTriggerCallbackUrlInner>>>() {
                @Override
                public Observable<ServiceResponse<WorkflowTriggerCallbackUrlInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<WorkflowTriggerCallbackUrlInner> clientResponse = listCallbackUrlDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<WorkflowTriggerCallbackUrlInner> listCallbackUrlDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<WorkflowTriggerCallbackUrlInner, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<WorkflowTriggerCallbackUrlInner>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param nextPageLink The NextLink from the previous successful call to List operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the PagedList<WorkflowTriggerInner> object if successful.
     */
    public PagedList<WorkflowTriggerInner> listNext(final String nextPageLink) {
        ServiceResponse<Page<WorkflowTriggerInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
        return new PagedList<WorkflowTriggerInner>(response.body()) {
            @Override
            public Page<WorkflowTriggerInner> nextPage(String nextPageLink) {
                return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
            }
        };
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param nextPageLink The NextLink from the previous successful call to List operation.
     * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
     * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the {@link ServiceFuture} object
     */
    public ServiceFuture<List<WorkflowTriggerInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<WorkflowTriggerInner>> serviceFuture, final ListOperationCallback<WorkflowTriggerInner> serviceCallback) {
        return AzureServiceFuture.fromPageResponse(
            listNextSinglePageAsync(nextPageLink),
            new Func1<String, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(String nextPageLink) {
                    return listNextSinglePageAsync(nextPageLink);
                }
            },
            serviceCallback);
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param nextPageLink The NextLink from the previous successful call to List operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<Page<WorkflowTriggerInner>> listNextAsync(final String nextPageLink) {
        return listNextWithServiceResponseAsync(nextPageLink)
            .map(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Page<WorkflowTriggerInner>>() {
                @Override
                public Page<WorkflowTriggerInner> call(ServiceResponse<Page<WorkflowTriggerInner>> response) {
                    return response.body();
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
     * @param nextPageLink The NextLink from the previous successful call to List operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PagedList<WorkflowTriggerInner> object
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listNextWithServiceResponseAsync(final String nextPageLink) {
        return listNextSinglePageAsync(nextPageLink)
            .concatMap(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(ServiceResponse<Page<WorkflowTriggerInner>> page) {
                    String nextPageLink = page.body().nextPageLink();
                    if (nextPageLink == null) {
                        return Observable.just(page);
                    }
                    return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
                }
            });
    }

    /**
     * Gets a list of workflow triggers.
     *
    ServiceResponse<PageImpl<WorkflowTriggerInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the PagedList<WorkflowTriggerInner> object wrapped in {@link ServiceResponse} if successful.
     */
    public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> listNextSinglePageAsync(final String nextPageLink) {
        if (nextPageLink == null) {
            throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
        }
        String nextUrl = String.format("%s", nextPageLink);
        return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<WorkflowTriggerInner>>>>() {
                @Override
                public Observable<ServiceResponse<Page<WorkflowTriggerInner>>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<PageImpl<WorkflowTriggerInner>> result = listNextDelegate(response);
                        return Observable.just(new ServiceResponse<Page<WorkflowTriggerInner>>(result.body(), result.response()));
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }

    private ServiceResponse<PageImpl<WorkflowTriggerInner>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
        return this.client.restClient().responseBuilderFactory().<PageImpl<WorkflowTriggerInner>, CloudException>newInstance(this.client.serializerAdapter())
                .register(200, new TypeToken<PageImpl<WorkflowTriggerInner>>() { }.getType())
                .registerError(CloudException.class)
                .build(response);
    }

}


text:
a collection of scripts that makes my life easier working with node projects

# installation

```bash
$ brew tap doodzik/tap
$ brew install npm-scripts

# add this to your bash/zsh rc file
. n.sh
# or if you dont want nvm to slow down your machine
# run this when you need it
. ninit
```

#### n
npm

#### ni
npm install

#### nis $MODULE_NAMES
installs a list of modules and adds them as a dependencies to the package.json

#### nid $MODULE_NAMES
installs a list of modules and adds them as a devDependencies to the package.json

#### nig $MODULE_NAMES
installs a list of modules as global modules

#### nr $SCRIPT_NAME [$SCRIPT_ARGS]
runs a script with or without arguments that was installed in node_modules/.bin/
i.e. gulp, mocha, ect.

#### ns
npm start

#### nt
npm test