text:
package net.sf.jasperreports.components.sort;

import net.sf.jasperreports.engine.JRConstants;
import net.sf.jasperreports.engine.type.EnumUtil;
import net.sf.jasperreports.engine.type.JREnum;

/**
 * @author Teodor Danciu (teodord@users.sourceforge.net)
 * @version $Id: FilterTypeDateOperatorsEnum.java 7199 2014-08-27 13:58:10Z teodord $
 */
public enum FilterTypeDateOperatorsEnum implements JREnum
{
	EQUALS((byte)1, "Equals"),

	IS_NOT_EQUAL_TO((byte)2, "Is not Equal to"),

	IS_BETWEEN((byte)3, "Is Between"),

	IS_NOT_BETWEEN((byte)4, "Is not between"),

	IS_ON_OR_BEFORE((byte)5, "Is On or Before"),

	IS_BEFORE((byte)6, "Is Before"),

	IS_ON_OR_AFTER((byte)7, "Is On or After"),

	IS_AFTER((byte)8, "Is After");

	/**
	 *
	 */
	private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID;
	private final transient byte value;
	private final transient String name;

	private FilterTypeDateOperatorsEnum(byte value, String name)
	{
		this.value = value;
		this.name = name;
	}

	/**
	 *
	 */
	public Byte getValueByte()
	{
		return new Byte(value);
	}

	/**
	 *
	 */
	public final byte getValue()
	{
		return value;
	}

	/**
	 *
	 */
	public String getName()
	{
		return name;
	}

	/**
	 *
	 */
	public static FilterTypeDateOperatorsEnum getByName(String name)
	{
		return (FilterTypeDateOperatorsEnum)EnumUtil.getByName(values(), name);
	}

	/**
	 *
	 */
	public static FilterTypeDateOperatorsEnum getByEnumConstantName(String name)
	{
		return (FilterTypeDateOperatorsEnum)EnumUtil.getByEnumConstantName(values(), name);
	}

	/**
	 *
	 */
	public static FilterTypeDateOperatorsEnum getByValue(Byte value)
	{
		return (FilterTypeDateOperatorsEnum)EnumUtil.getByValue(values(), value);
	}

	/**
	 *
	 */
	public static FilterTypeDateOperatorsEnum getByValue(byte value)
	{
		return getByValue(new Byte(value));
	}

}


text:
<?php

namespace Phpml\Exception;

class FileException extends \Exception
{
    /**
     * @param string $filepath
     *
     * @return FileException
     */
    public static function missingFile($filepath)
    {
        return new self(sprintf('File "%s" missing.', $filepath));
    }
    /**
     * @param string $filepath
     *
     * @return FileException
     */
    public static function cantOpenFile($filepath)
    {
        return new self(sprintf('File "%s" can\'t be open.', $filepath));
    }
    /**
     * @param string $filepath
     *
     * @return FileException
     */
    public static function cantSaveFile($filepath)
    {
        return new self(sprintf('File "%s" can\'t be saved.', $filepath));
    }
}

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Trichosporum pinicolum Dearn. & Barthol.

### Remarks
null


text:
/**
 * Created by netanel on 16/12/14.
 */
injector.directive('functionsActions', function() {
  return {
    restrict: 'E',
    templateUrl : 'client/scripts/directives/functionsActions/functionsActions.ng.html',
    controller : function($scope, Functions) {
      $scope.save = function() {
        Functions.saveFunction();
      }
    }
  }
});


text:
<?php # -*- coding: utf-8 -*-
declare(strict_types=1);
?>

<footer class="wrapper">
    <?php
    require_once '../vendor/autoload.php';

    use Bueltge\Marksimple\Marksimple;

    // Parse the Markdown fromFile from a string.
    $footercontent = new Marksimple();
    print $footercontent->parse('Made with ♥ · [bueltge.de](https://bueltge.de)');
    ?>
</footer>

<script src="js/highlight.pack.js"></script>
<script src="js/main.js"></script>

</body>
</html>


text:
import * as protos from '../protos/protos';
import * as assert from 'assert';
import * as sinon from 'sinon';
import {SinonStub} from 'sinon';
import {describe, it} from 'mocha';
import * as reachabilityserviceModule from '../src';

import {PassThrough} from 'stream';

import {protobuf, LROperation, operationsProtos} from 'google-gax';

// Dynamically loaded proto JSON is needed to get the type information
// to fill in default values for request objects
const root = protobuf.Root.fromJSON(
  require('../protos/protos.json')
).resolveAll();

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function getTypeDefaultValue(typeName: string, fields: string[]) {
  let type = root.lookupType(typeName) as protobuf.Type;
  for (const field of fields.slice(0, -1)) {
    type = type.fields[field]?.resolvedType as protobuf.Type;
  }
  return type.fields[fields[fields.length - 1]]?.defaultValue;
}

function generateSampleMessage<T extends object>(instance: T) {
  const filledObject = (
    instance.constructor as typeof protobuf.Message
  ).toObject(instance as protobuf.Message<T>, {defaults: true});
  return (instance.constructor as typeof protobuf.Message).fromObject(
    filledObject
  ) as T;
}

function stubSimpleCall<ResponseType>(response?: ResponseType, error?: Error) {
  return error
    ? sinon.stub().rejects(error)
    : sinon.stub().resolves([response]);
}

function stubSimpleCallWithCallback<ResponseType>(
  response?: ResponseType,
  error?: Error
) {
  return error
    ? sinon.stub().callsArgWith(2, error)
    : sinon.stub().callsArgWith(2, null, response);
}

function stubLongRunningCall<ResponseType>(
  response?: ResponseType,
  callError?: Error,
  lroError?: Error
) {
  const innerStub = lroError
    ? sinon.stub().rejects(lroError)
    : sinon.stub().resolves([response]);
  const mockOperation = {
    promise: innerStub,
  };
  return callError
    ? sinon.stub().rejects(callError)
    : sinon.stub().resolves([mockOperation]);
}

function stubLongRunningCallWithCallback<ResponseType>(
  response?: ResponseType,
  callError?: Error,
  lroError?: Error
) {
  const innerStub = lroError
    ? sinon.stub().rejects(lroError)
    : sinon.stub().resolves([response]);
  const mockOperation = {
    promise: innerStub,
  };
  return callError
    ? sinon.stub().callsArgWith(2, callError)
    : sinon.stub().callsArgWith(2, null, mockOperation);
}

function stubPageStreamingCall<ResponseType>(
  responses?: ResponseType[],
  error?: Error
) {
  const pagingStub = sinon.stub();
  if (responses) {
    for (let i = 0; i < responses.length; ++i) {
      pagingStub.onCall(i).callsArgWith(2, null, responses[i]);
    }
  }
  const transformStub = error
    ? sinon.stub().callsArgWith(2, error)
    : pagingStub;
  const mockStream = new PassThrough({
    objectMode: true,
    transform: transformStub,
  });
  // trigger as many responses as needed
  if (responses) {
    for (let i = 0; i < responses.length; ++i) {
      setImmediate(() => {
        mockStream.write({});
      });
    }
    setImmediate(() => {
      mockStream.end();
    });
  } else {
    setImmediate(() => {
      mockStream.write({});
    });
    setImmediate(() => {
      mockStream.end();
    });
  }
  return sinon.stub().returns(mockStream);
}

function stubAsyncIterationCall<ResponseType>(
  responses?: ResponseType[],
  error?: Error
) {
  let counter = 0;
  const asyncIterable = {
    [Symbol.asyncIterator]() {
      return {
        async next() {
          if (error) {
            return Promise.reject(error);
          }
          if (counter >= responses!.length) {
            return Promise.resolve({done: true, value: undefined});
          }
          return Promise.resolve({done: false, value: responses![counter++]});
        },
      };
    },
  };
  return sinon.stub().returns(asyncIterable);
}

describe('v1beta1.ReachabilityServiceClient', () => {
  describe('Common methods', () => {
    it('has servicePath', () => {
      const servicePath =
        reachabilityserviceModule.v1beta1.ReachabilityServiceClient.servicePath;
      assert(servicePath);
    });

    it('has apiEndpoint', () => {
      const apiEndpoint =
        reachabilityserviceModule.v1beta1.ReachabilityServiceClient.apiEndpoint;
      assert(apiEndpoint);
    });

    it('has port', () => {
      const port =
        reachabilityserviceModule.v1beta1.ReachabilityServiceClient.port;
      assert(port);
      assert(typeof port === 'number');
    });

    it('should create a client with no option', () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient();
      assert(client);
    });

    it('should create a client with gRPC fallback', () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          fallback: true,
        });
      assert(client);
    });

    it('has initialize method and supports deferred initialization', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      assert.strictEqual(client.reachabilityServiceStub, undefined);
      await client.initialize();
      assert(client.reachabilityServiceStub);
    });

    it('has close method for the initialized client', done => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      assert(client.reachabilityServiceStub);
      client.close().then(() => {
        done();
      });
    });

    it('has close method for the non-initialized client', done => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      assert.strictEqual(client.reachabilityServiceStub, undefined);
      client.close().then(() => {
        done();
      });
    });

    it('has getProjectId method', async () => {
      const fakeProjectId = 'fake-project-id';
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.auth.getProjectId = sinon.stub().resolves(fakeProjectId);
      const result = await client.getProjectId();
      assert.strictEqual(result, fakeProjectId);
      assert((client.auth.getProjectId as SinonStub).calledWithExactly());
    });

    it('has getProjectId method with callback', async () => {
      const fakeProjectId = 'fake-project-id';
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.auth.getProjectId = sinon
        .stub()
        .callsArgWith(0, null, fakeProjectId);
      const promise = new Promise((resolve, reject) => {
        client.getProjectId((err?: Error | null, projectId?: string | null) => {
          if (err) {
            reject(err);
          } else {
            resolve(projectId);
          }
        });
      });
      const result = await promise;
      assert.strictEqual(result, fakeProjectId);
    });
  });

  describe('getConnectivityTest', () => {
    it('invokes getConnectivityTest without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
      );
      client.innerApiCalls.getConnectivityTest =
        stubSimpleCall(expectedResponse);
      const [response] = await client.getConnectivityTest(request);
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes getConnectivityTest without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
      );
      client.innerApiCalls.getConnectivityTest =
        stubSimpleCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.getConnectivityTest(
          request,
          (
            err?: Error | null,
            result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const response = await promise;
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes getConnectivityTest with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.getConnectivityTest = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(client.getConnectivityTest(request), expectedError);
      const actualRequest = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.getConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes getConnectivityTest with closed client', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedError = new Error('The client has already been closed.');
      client.close();
      await assert.rejects(client.getConnectivityTest(request), expectedError);
    });
  });

  describe('createConnectivityTest', () => {
    it('invokes createConnectivityTest without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.createConnectivityTest =
        stubLongRunningCall(expectedResponse);
      const [operation] = await client.createConnectivityTest(request);
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes createConnectivityTest without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.createConnectivityTest =
        stubLongRunningCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.createConnectivityTest(
          request,
          (
            err?: Error | null,
            result?: LROperation<
              protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
              protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
            > | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const operation = (await promise) as LROperation<
        protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
        protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
      >;
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes createConnectivityTest with call error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.createConnectivityTest = stubLongRunningCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.createConnectivityTest(request),
        expectedError
      );
      const actualRequest = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes createConnectivityTest with LRO error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.createConnectivityTest = stubLongRunningCall(
        undefined,
        undefined,
        expectedError
      );
      const [operation] = await client.createConnectivityTest(request);
      await assert.rejects(operation.promise(), expectedError);
      const actualRequest = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.createConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes checkCreateConnectivityTestProgress without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedResponse = generateSampleMessage(
        new operationsProtos.google.longrunning.Operation()
      );
      expectedResponse.name = 'test';
      expectedResponse.response = {type_url: 'url', value: Buffer.from('')};
      expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')};

      client.operationsClient.getOperation = stubSimpleCall(expectedResponse);
      const decodedOperation = await client.checkCreateConnectivityTestProgress(
        expectedResponse.name
      );
      assert.deepStrictEqual(decodedOperation.name, expectedResponse.name);
      assert(decodedOperation.metadata);
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });

    it('invokes checkCreateConnectivityTestProgress with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedError = new Error('expected');

      client.operationsClient.getOperation = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.checkCreateConnectivityTestProgress(''),
        expectedError
      );
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });
  });

  describe('updateConnectivityTest', () => {
    it('invokes updateConnectivityTest without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest()
      );
      request.resource ??= {};
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest',
        ['resource', 'name']
      );
      request.resource.name = defaultValue1;
      const expectedHeaderRequestParams = `resource.name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.updateConnectivityTest =
        stubLongRunningCall(expectedResponse);
      const [operation] = await client.updateConnectivityTest(request);
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes updateConnectivityTest without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest()
      );
      request.resource ??= {};
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest',
        ['resource', 'name']
      );
      request.resource.name = defaultValue1;
      const expectedHeaderRequestParams = `resource.name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.updateConnectivityTest =
        stubLongRunningCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.updateConnectivityTest(
          request,
          (
            err?: Error | null,
            result?: LROperation<
              protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
              protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
            > | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const operation = (await promise) as LROperation<
        protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
        protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
      >;
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes updateConnectivityTest with call error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest()
      );
      request.resource ??= {};
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest',
        ['resource', 'name']
      );
      request.resource.name = defaultValue1;
      const expectedHeaderRequestParams = `resource.name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.updateConnectivityTest(request),
        expectedError
      );
      const actualRequest = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes updateConnectivityTest with LRO error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest()
      );
      request.resource ??= {};
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest',
        ['resource', 'name']
      );
      request.resource.name = defaultValue1;
      const expectedHeaderRequestParams = `resource.name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(
        undefined,
        undefined,
        expectedError
      );
      const [operation] = await client.updateConnectivityTest(request);
      await assert.rejects(operation.promise(), expectedError);
      const actualRequest = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.updateConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes checkUpdateConnectivityTestProgress without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedResponse = generateSampleMessage(
        new operationsProtos.google.longrunning.Operation()
      );
      expectedResponse.name = 'test';
      expectedResponse.response = {type_url: 'url', value: Buffer.from('')};
      expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')};

      client.operationsClient.getOperation = stubSimpleCall(expectedResponse);
      const decodedOperation = await client.checkUpdateConnectivityTestProgress(
        expectedResponse.name
      );
      assert.deepStrictEqual(decodedOperation.name, expectedResponse.name);
      assert(decodedOperation.metadata);
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });

    it('invokes checkUpdateConnectivityTestProgress with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedError = new Error('expected');

      client.operationsClient.getOperation = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.checkUpdateConnectivityTestProgress(''),
        expectedError
      );
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });
  });

  describe('rerunConnectivityTest', () => {
    it('invokes rerunConnectivityTest without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.rerunConnectivityTest =
        stubLongRunningCall(expectedResponse);
      const [operation] = await client.rerunConnectivityTest(request);
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes rerunConnectivityTest without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.rerunConnectivityTest =
        stubLongRunningCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.rerunConnectivityTest(
          request,
          (
            err?: Error | null,
            result?: LROperation<
              protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
              protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
            > | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const operation = (await promise) as LROperation<
        protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest,
        protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
      >;
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes rerunConnectivityTest with call error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.rerunConnectivityTest(request),
        expectedError
      );
      const actualRequest = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes rerunConnectivityTest with LRO error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(
        undefined,
        undefined,
        expectedError
      );
      const [operation] = await client.rerunConnectivityTest(request);
      await assert.rejects(operation.promise(), expectedError);
      const actualRequest = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.rerunConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes checkRerunConnectivityTestProgress without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedResponse = generateSampleMessage(
        new operationsProtos.google.longrunning.Operation()
      );
      expectedResponse.name = 'test';
      expectedResponse.response = {type_url: 'url', value: Buffer.from('')};
      expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')};

      client.operationsClient.getOperation = stubSimpleCall(expectedResponse);
      const decodedOperation = await client.checkRerunConnectivityTestProgress(
        expectedResponse.name
      );
      assert.deepStrictEqual(decodedOperation.name, expectedResponse.name);
      assert(decodedOperation.metadata);
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });

    it('invokes checkRerunConnectivityTestProgress with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedError = new Error('expected');

      client.operationsClient.getOperation = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.checkRerunConnectivityTestProgress(''),
        expectedError
      );
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });
  });

  describe('deleteConnectivityTest', () => {
    it('invokes deleteConnectivityTest without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.deleteConnectivityTest =
        stubLongRunningCall(expectedResponse);
      const [operation] = await client.deleteConnectivityTest(request);
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes deleteConnectivityTest without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedResponse = generateSampleMessage(
        new protos.google.longrunning.Operation()
      );
      client.innerApiCalls.deleteConnectivityTest =
        stubLongRunningCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.deleteConnectivityTest(
          request,
          (
            err?: Error | null,
            result?: LROperation<
              protos.google.protobuf.IEmpty,
              protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
            > | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const operation = (await promise) as LROperation<
        protos.google.protobuf.IEmpty,
        protos.google.cloud.networkmanagement.v1beta1.IOperationMetadata
      >;
      const [response] = await operation.promise();
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes deleteConnectivityTest with call error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.deleteConnectivityTest(request),
        expectedError
      );
      const actualRequest = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes deleteConnectivityTest with LRO error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest',
        ['name']
      );
      request.name = defaultValue1;
      const expectedHeaderRequestParams = `name=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(
        undefined,
        undefined,
        expectedError
      );
      const [operation] = await client.deleteConnectivityTest(request);
      await assert.rejects(operation.promise(), expectedError);
      const actualRequest = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.deleteConnectivityTest as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes checkDeleteConnectivityTestProgress without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedResponse = generateSampleMessage(
        new operationsProtos.google.longrunning.Operation()
      );
      expectedResponse.name = 'test';
      expectedResponse.response = {type_url: 'url', value: Buffer.from('')};
      expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')};

      client.operationsClient.getOperation = stubSimpleCall(expectedResponse);
      const decodedOperation = await client.checkDeleteConnectivityTestProgress(
        expectedResponse.name
      );
      assert.deepStrictEqual(decodedOperation.name, expectedResponse.name);
      assert(decodedOperation.metadata);
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });

    it('invokes checkDeleteConnectivityTestProgress with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const expectedError = new Error('expected');

      client.operationsClient.getOperation = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.checkDeleteConnectivityTestProgress(''),
        expectedError
      );
      assert((client.operationsClient.getOperation as SinonStub).getCall(0));
    });
  });

  describe('listConnectivityTests', () => {
    it('invokes listConnectivityTests without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = [
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
      ];
      client.innerApiCalls.listConnectivityTests =
        stubSimpleCall(expectedResponse);
      const [response] = await client.listConnectivityTests(request);
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes listConnectivityTests without error using callback', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = [
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
      ];
      client.innerApiCalls.listConnectivityTests =
        stubSimpleCallWithCallback(expectedResponse);
      const promise = new Promise((resolve, reject) => {
        client.listConnectivityTests(
          request,
          (
            err?: Error | null,
            result?:
              | protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[]
              | null
          ) => {
            if (err) {
              reject(err);
            } else {
              resolve(result);
            }
          }
        );
      });
      const response = await promise;
      assert.deepStrictEqual(response, expectedResponse);
      const actualRequest = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes listConnectivityTests with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.innerApiCalls.listConnectivityTests = stubSimpleCall(
        undefined,
        expectedError
      );
      await assert.rejects(
        client.listConnectivityTests(request),
        expectedError
      );
      const actualRequest = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[0];
      assert.deepStrictEqual(actualRequest, request);
      const actualHeaderRequestParams = (
        client.innerApiCalls.listConnectivityTests as SinonStub
      ).getCall(0).args[1].otherArgs.headers['x-goog-request-params'];
      assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams));
    });

    it('invokes listConnectivityTestsStream without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = [
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
      ];
      client.descriptors.page.listConnectivityTests.createStream =
        stubPageStreamingCall(expectedResponse);
      const stream = client.listConnectivityTestsStream(request);
      const promise = new Promise((resolve, reject) => {
        const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] =
          [];
        stream.on(
          'data',
          (
            response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest
          ) => {
            responses.push(response);
          }
        );
        stream.on('end', () => {
          resolve(responses);
        });
        stream.on('error', (err: Error) => {
          reject(err);
        });
      });
      const responses = await promise;
      assert.deepStrictEqual(responses, expectedResponse);
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .createStream as SinonStub
        )
          .getCall(0)
          .calledWith(client.innerApiCalls.listConnectivityTests, request)
      );
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .createStream as SinonStub
        )
          .getCall(0)
          .args[2].otherArgs.headers['x-goog-request-params'].includes(
            expectedHeaderRequestParams
          )
      );
    });

    it('invokes listConnectivityTestsStream with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.descriptors.page.listConnectivityTests.createStream =
        stubPageStreamingCall(undefined, expectedError);
      const stream = client.listConnectivityTestsStream(request);
      const promise = new Promise((resolve, reject) => {
        const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] =
          [];
        stream.on(
          'data',
          (
            response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest
          ) => {
            responses.push(response);
          }
        );
        stream.on('end', () => {
          resolve(responses);
        });
        stream.on('error', (err: Error) => {
          reject(err);
        });
      });
      await assert.rejects(promise, expectedError);
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .createStream as SinonStub
        )
          .getCall(0)
          .calledWith(client.innerApiCalls.listConnectivityTests, request)
      );
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .createStream as SinonStub
        )
          .getCall(0)
          .args[2].otherArgs.headers['x-goog-request-params'].includes(
            expectedHeaderRequestParams
          )
      );
    });

    it('uses async iteration with listConnectivityTests without error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedResponse = [
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
        generateSampleMessage(
          new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()
        ),
      ];
      client.descriptors.page.listConnectivityTests.asyncIterate =
        stubAsyncIterationCall(expectedResponse);
      const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] =
        [];
      const iterable = client.listConnectivityTestsAsync(request);
      for await (const resource of iterable) {
        responses.push(resource!);
      }
      assert.deepStrictEqual(responses, expectedResponse);
      assert.deepStrictEqual(
        (
          client.descriptors.page.listConnectivityTests
            .asyncIterate as SinonStub
        ).getCall(0).args[1],
        request
      );
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .asyncIterate as SinonStub
        )
          .getCall(0)
          .args[2].otherArgs.headers['x-goog-request-params'].includes(
            expectedHeaderRequestParams
          )
      );
    });

    it('uses async iteration with listConnectivityTests with error', async () => {
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      const request = generateSampleMessage(
        new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest()
      );
      const defaultValue1 = getTypeDefaultValue(
        '.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest',
        ['parent']
      );
      request.parent = defaultValue1;
      const expectedHeaderRequestParams = `parent=${defaultValue1}`;
      const expectedError = new Error('expected');
      client.descriptors.page.listConnectivityTests.asyncIterate =
        stubAsyncIterationCall(undefined, expectedError);
      const iterable = client.listConnectivityTestsAsync(request);
      await assert.rejects(async () => {
        const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] =
          [];
        for await (const resource of iterable) {
          responses.push(resource!);
        }
      });
      assert.deepStrictEqual(
        (
          client.descriptors.page.listConnectivityTests
            .asyncIterate as SinonStub
        ).getCall(0).args[1],
        request
      );
      assert(
        (
          client.descriptors.page.listConnectivityTests
            .asyncIterate as SinonStub
        )
          .getCall(0)
          .args[2].otherArgs.headers['x-goog-request-params'].includes(
            expectedHeaderRequestParams
          )
      );
    });
  });

  describe('Path templates', () => {
    describe('connectivityTest', () => {
      const fakePath = '/rendered/path/connectivityTest';
      const expectedParameters = {
        project: 'projectValue',
        test: 'testValue',
      };
      const client =
        new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({
          credentials: {client_email: 'bogus', private_key: 'bogus'},
          projectId: 'bogus',
        });
      client.initialize();
      client.pathTemplates.connectivityTestPathTemplate.render = sinon
        .stub()
        .returns(fakePath);
      client.pathTemplates.connectivityTestPathTemplate.match = sinon
        .stub()
        .returns(expectedParameters);

      it('connectivityTestPath', () => {
        const result = client.connectivityTestPath('projectValue', 'testValue');
        assert.strictEqual(result, fakePath);
        assert(
          (
            client.pathTemplates.connectivityTestPathTemplate
              .render as SinonStub
          )
            .getCall(-1)
            .calledWith(expectedParameters)
        );
      });

      it('matchProjectFromConnectivityTestName', () => {
        const result = client.matchProjectFromConnectivityTestName(fakePath);
        assert.strictEqual(result, 'projectValue');
        assert(
          (client.pathTemplates.connectivityTestPathTemplate.match as SinonStub)
            .getCall(-1)
            .calledWith(fakePath)
        );
      });

      it('matchTestFromConnectivityTestName', () => {
        const result = client.matchTestFromConnectivityTestName(fakePath);
        assert.strictEqual(result, 'testValue');
        assert(
          (client.pathTemplates.connectivityTestPathTemplate.match as SinonStub)
            .getCall(-1)
            .calledWith(fakePath)
        );
      });
    });
  });
});


text:
    <page-header>

    </page-header>
    <page-body>

    </page-body>


text:
@interface FunLargeCell : FunCellBase

@end


text:
package io.gravitee.repository.mongodb.management.internal.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Objects;

/**
 * @author Azize ELAMRANI (azize.elamrani at graviteesource.com)
 * @author GraviteeSource Team
 */
@Document(collection = "metadatas")
public class ApiMetadataMongo {

	@Id
	private String id;

	private String value;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof ApiMetadataMongo)) return false;
		ApiMetadataMongo that = (ApiMetadataMongo) o;
		return Objects.equals(id, that.id);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id);
	}

	@Override
	public String toString() {
		return "ApiMetadataMongo{" +
				"id='" + id + '\'' +
				", value='" + value + '\'' +
				'}';
	}
}


text:
**All scripts assume you are in the mlengine folder.**
## Train locally
```bash
python trainer/task.py
```
or
```bash
mlengine mgorner$ gcloud ml-engine local train --module-name trainer.task --package-path trainer
```
## Train in the cloud
(jobXXX, jobs/jobXXX, <<project> and <bucket> must be replaced with your own values)
```bash
gcloud ml-engine jobs submit training jobXXX --job-dir gs://<bucket>/jobs/jobXXX --project <project> --config=config.yaml --module-name trainer.task --package-path trainer
```
## Predictions from the cloud
Use the Cloud ML Engine UI to create a model and a version from
the saved data from your training run.
You will find it in folder:

gs://<bucket>/jobs/jobXXX/export/Servo/XXXXXXXXXX

Set your version of the model as the default version, then
create the JSON payload. You can use the script:
```bash
python digits.py > digits.json
```
Then call the online predictions service, replacing <model_name> with the name you have assigned:
```bash
gcloud ml-engine predict --model <model_name> --json-instances digits.json
```
It should return a perfect scorecard:

| CLASSES  | PREDICTIONS |
| ------------- | ------------- |
| 8  | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0]  |
| 7  | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0]  |
| 7  | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0]  |
| 5  | [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]  |
| 5  | [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]  |
## Local predictions
You can also simulate the prediction service locally, replace XXXXX with the # of your saved model:
```bash
gcloud ml-engine local predict --model-dir checkpoints/export/Servo/XXXXX --json-instances digits.json
```

---
### Misc.
If you want to experiment with TF Records, the sandard Tensorflow
data format, you can run this script ((availble in the tensorflow distribution)
to reformat the MNIST dataset into TF Records. It is not necessary for this sample though.

```bash
python <YOUR-TF-DIR>/tensorflow/examples/how_tos/reading_data/convert_to_records.py --directory=data --validation_size=0
```


text:
package io.robusta.rra.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

/**
 * Small class for commn tasks on Lists Created by Nicolas Zozol for Robusta
 * Code
 *
 * @author Nicolas Zozol
 */
public class ListUtils {

    /**
     * The list will be modified if all elements are not unique.
     *

     * For exemple, if list is 3,4,5,3,5,3,0,11, then after setUnicity(list),
     * list will be 3,4,5,0,11

     * The function removes element with highest index in the list
     *

     *
     * @param list
     *            the list to modify
     */
    public static void setUnicity( List list ) {

        if ( list == null ) {
            return;
        }

        if ( list.size() <= 1 )
            return;

        Object current;

        for ( int i = 0; i < list.size(); i++ ) {
            current = list.get( i );

            int index = list.lastIndexOf( current );
            if ( index != i ) {
                list.remove( index );
                setUnicity( list );
            }
        }

    }

    public static <T> List<T> list( Collection<T> collection ) {
        ArrayList<T> list = new ArrayList<T>();
        for ( T t : collection ) {
            list.add( t );
        }
        return list;
    }

    public static String join( String glue, Collection collection ) {

        StringBuilder result = new StringBuilder();
        Iterator it = collection.iterator();
        while ( it.hasNext() ) {
            Object o = it.next();
            result.append( o.toString() );
            if ( it.hasNext() ) {
                result.append( glue );
            }
        }

        return result.toString();
    }

}


text:
/**
 * Charter sub route
 */
import * as React from "react";
import {
  Container,
  CharterTitle,
  CharterFirst,
  CharterSecond,
  CharterThird,
  CharterFourth,
  CharterFifth,
  CharterSixth,
  CharterProgram,
  Responsibility
} from "../../components";

export class Charter extends React.PureComponent {
  public render() {
    return (
      <Container>
        <CharterTitle />
        <CharterFirst />
        <CharterSecond />
        <CharterThird />
        <CharterFourth />
        <CharterSixth />
        <CharterProgram />
        <Responsibility />
      </Container>
    );
  }
}


text:
.form-group > .err-message{
    display: none;
}

.form-group.has-error > .err-message{
    display: block;
}


text:
(function () {
  'use strict';

  angular.module('pnc.build-configs').component('pncSelectBuildParameters', {
    require: {
      ngModel: '?ngModel'
    },
    templateUrl: 'build-configs/directives/pnc-select-build-parameters/pnc-select-build-parameters.html',
    controller: ['$scope', '$log', 'utils', 'BuildConfiguration', Controller]
  });

  function Controller($scope, $log, utils, BuildConfiguration) {
    var $ctrl = this;

    // -- Controller API --

    $ctrl.knownKeys = undefined;
    $ctrl.params = {};

    $ctrl.addParam = addParam;
    $ctrl.removeParam = removeParam;
    $ctrl.hasParams = hasParams;

    // --------------------

    $ctrl.$onInit = function () {

      $ctrl.knownKeys = BuildConfiguration.getSupportedGenericParameters().then(function (params) {
        return formatSupportedParams(params);
      });

      $scope.$watch(function () {
        return utils.concatStrings($ctrl.params);
      }, function () {
        $ctrl.ngModel.$setViewValue($ctrl.params);
      });

      $ctrl.ngModel.$render = function () {
        $ctrl.params = angular.isDefined($ctrl.ngModel.$viewValue) ? $ctrl.ngModel.$viewValue : {};
      };
    };

    function addParam(key, value) {
      $ctrl.params[key] = value;
    }

    function removeParam(key) {
      delete $ctrl.params[key];
    }

    function hasParams() {
      return Object.keys($ctrl.params).length > 0;
    }

    function formatSupportedParams(params) {
      var result = [];

      Object.keys(params).forEach(function (key) {
        result.push({
          name: key,
          description: params[key]
        });
      });

      return result;
    }

  }
})();


text:
package com.dci.intellij.dbn.common.environment.options;

import com.dci.intellij.dbn.common.options.PersistentConfiguration;
import com.dci.intellij.dbn.common.options.setting.BooleanSetting;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import org.jdom.Element;

public class EnvironmentVisibilitySettings implements PersistentConfiguration {
    private BooleanSetting connectionTabs = new BooleanSetting("connection-tabs", true);
    private BooleanSetting objectEditorTabs = new BooleanSetting("object-editor-tabs", true);
    private BooleanSetting scriptEditorTabs = new BooleanSetting("script-editor-tabs", false);
    private BooleanSetting dialogHeaders = new BooleanSetting("dialog-headers", true);
    private BooleanSetting executionResultTabs = new BooleanSetting("execution-result-tabs", true);

    public BooleanSetting getConnectionTabs() {
        return connectionTabs;
    }

    public BooleanSetting getObjectEditorTabs() {
        return objectEditorTabs;
    }

    public BooleanSetting getScriptEditorTabs() {
        return scriptEditorTabs;
    }

    public BooleanSetting getDialogHeaders() {
        return dialogHeaders;
    }

    public BooleanSetting getExecutionResultTabs() {
        return executionResultTabs;
    }

    @Override
    public void readConfiguration(Element element) throws InvalidDataException {
        connectionTabs.readConfiguration(element);
        dialogHeaders.readConfiguration(element);
        objectEditorTabs.readConfiguration(element);
        scriptEditorTabs.readConfiguration(element);
        executionResultTabs.readConfiguration(element);
    }

    @Override
    public void writeConfiguration(Element element) throws WriteExternalException {
        connectionTabs.writeConfiguration(element);
        dialogHeaders.writeConfiguration(element);
        objectEditorTabs.writeConfiguration(element);
        scriptEditorTabs.writeConfiguration(element);
        executionResultTabs.writeConfiguration(element);
    }
}


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<title>Formulaire Logistique</title>

Formulaire - Logistique

		<form id="form">
			<fieldset>

						Nom
						<input class="form-control" type="text" name="name" placeholder="Mon nom" />

						Prénom
						<input class="form-control" type="text" name="surname" placeholder="Mon prénom" />

						Adresse
						<input class="form-control" type="text" name="address" placeholder="N° de la rue + nom de la rue" />

						Email
						<input class="form-control" type="email" name="city" placeholder="Ma ville" />

						Code Postal
						<input class="form-control" type="number" name="zipcode" placeholder="95140" />

						Téléphone

							+33
							<input class="form-control" type="tel" name="phonenumber" placeholder="06 12 34 56 78" />

						<button class="btn btn-primary btn-block">Envoyer</button>

			</fieldset>
		</form>


text:
{%extends "issue_base.html"%}
{%block title1%}Edit Issue -{%endblock%}
{%block head%}{{form.media}}{%endblock%}
{%block issue_body%}
<form action="{%url codereview.views.edit issue.key.id%}"
      method="post" id="edit-form">
<input type="hidden" name="xsrf_token" value="{{xsrf_token}}">

{{form}}
{%if issue.local_base%}

  Base files:</hd>
  Use upload.py to upload base files.

{%endif%}

<input type="submit" value="Update Issue">

</form>

Owner: {{issue.owner|show_user}}

Created: {{issue.created|date:"Y/m/d H:i:s"}}

Last updated: {{issue.modified|date:"Y/m/d H:i:s"}}

{%ifequal issue.owner user%}

Delete This Issue

<form action="{%url codereview.views.delete issue.key.id%}" method="post">
<input type="hidden" name="xsrf_token" value="{{xsrf_token}}">
<input type="submit" value="Delete Issue"> There is no undo!
</form>
{%endifequal%}

{%endblock%}


text:
package com.google.api.ads.adwords.jaxws.v201409.o;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.google.api.ads.adwords.jaxws.v201409.cm.Money;

/**
 *
 *             Represents a set of stats for a daily traffic estimate.
 *             As of v201406 {@code averageCpc}, {@code averagePosition} and {@code clickThroughRate} will be
 *             {@code null} when not defined (respectively, if {@code clicksPerDay} or
 *             {@code impressionsPerDay} are 0).
 *
 *
 *
Java class for StatsEstimate complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="StatsEstimate">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="averageCpc" type="{https://adwords.google.com/api/adwords/cm/v201409}Money" minOccurs="0"/>
 *         <element name="averagePosition" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
 *         <element name="clickThroughRate" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
 *         <element name="clicksPerDay" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
 *         <element name="impressionsPerDay" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
 *         <element name="totalCost" type="{https://adwords.google.com/api/adwords/cm/v201409}Money" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StatsEstimate", propOrder = {
    "averageCpc",
    "averagePosition",
    "clickThroughRate",
    "clicksPerDay",
    "impressionsPerDay",
    "totalCost"
})
public class StatsEstimate {

    protected Money averageCpc;
    protected Double averagePosition;
    protected Double clickThroughRate;
    protected Float clicksPerDay;
    protected Float impressionsPerDay;
    protected Money totalCost;

    /**
     * Gets the value of the averageCpc property.
     *
     * @return
     *     possible object is
     *     {@link Money }
     *
     */
    public Money getAverageCpc() {
        return averageCpc;
    }

    /**
     * Sets the value of the averageCpc property.
     *
     * @param value
     *     allowed object is
     *     {@link Money }
     *
     */
    public void setAverageCpc(Money value) {
        this.averageCpc = value;
    }

    /**
     * Gets the value of the averagePosition property.
     *
     * @return
     *     possible object is
     *     {@link Double }
     *
     */
    public Double getAveragePosition() {
        return averagePosition;
    }

    /**
     * Sets the value of the averagePosition property.
     *
     * @param value
     *     allowed object is
     *     {@link Double }
     *
     */
    public void setAveragePosition(Double value) {
        this.averagePosition = value;
    }

    /**
     * Gets the value of the clickThroughRate property.
     *
     * @return
     *     possible object is
     *     {@link Double }
     *
     */
    public Double getClickThroughRate() {
        return clickThroughRate;
    }

    /**
     * Sets the value of the clickThroughRate property.
     *
     * @param value
     *     allowed object is
     *     {@link Double }
     *
     */
    public void setClickThroughRate(Double value) {
        this.clickThroughRate = value;
    }

    /**
     * Gets the value of the clicksPerDay property.
     *
     * @return
     *     possible object is
     *     {@link Float }
     *
     */
    public Float getClicksPerDay() {
        return clicksPerDay;
    }

    /**
     * Sets the value of the clicksPerDay property.
     *
     * @param value
     *     allowed object is
     *     {@link Float }
     *
     */
    public void setClicksPerDay(Float value) {
        this.clicksPerDay = value;
    }

    /**
     * Gets the value of the impressionsPerDay property.
     *
     * @return
     *     possible object is
     *     {@link Float }
     *
     */
    public Float getImpressionsPerDay() {
        return impressionsPerDay;
    }

    /**
     * Sets the value of the impressionsPerDay property.
     *
     * @param value
     *     allowed object is
     *     {@link Float }
     *
     */
    public void setImpressionsPerDay(Float value) {
        this.impressionsPerDay = value;
    }

    /**
     * Gets the value of the totalCost property.
     *
     * @return
     *     possible object is
     *     {@link Money }
     *
     */
    public Money getTotalCost() {
        return totalCost;
    }

    /**
     * Sets the value of the totalCost property.
     *
     * @param value
     *     allowed object is
     *     {@link Money }
     *
     */
    public void setTotalCost(Money value) {
        this.totalCost = value;
    }

}


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>

#include "mscorlib_System_Object2689449295.h"

// System.String
struct String_t;
// System.Object
struct Il2CppObject;

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif

// System.Runtime.Remoting.Messaging.Header
struct  Header_t2756440555  : public Il2CppObject
{
public:
	// System.String System.Runtime.Remoting.Messaging.Header::HeaderNamespace
	String_t* ___HeaderNamespace_0;
	// System.Boolean System.Runtime.Remoting.Messaging.Header::MustUnderstand
	bool ___MustUnderstand_1;
	// System.String System.Runtime.Remoting.Messaging.Header::Name
	String_t* ___Name_2;
	// System.Object System.Runtime.Remoting.Messaging.Header::Value
	Il2CppObject * ___Value_3;

public:
	inline static int32_t get_offset_of_HeaderNamespace_0() { return static_cast<int32_t>(offsetof(Header_t2756440555, ___HeaderNamespace_0)); }
	inline String_t* get_HeaderNamespace_0() const { return ___HeaderNamespace_0; }
	inline String_t** get_address_of_HeaderNamespace_0() { return &___HeaderNamespace_0; }
	inline void set_HeaderNamespace_0(String_t* value)
	{
		___HeaderNamespace_0 = value;
		Il2CppCodeGenWriteBarrier(&___HeaderNamespace_0, value);
	}

	inline static int32_t get_offset_of_MustUnderstand_1() { return static_cast<int32_t>(offsetof(Header_t2756440555, ___MustUnderstand_1)); }
	inline bool get_MustUnderstand_1() const { return ___MustUnderstand_1; }
	inline bool* get_address_of_MustUnderstand_1() { return &___MustUnderstand_1; }
	inline void set_MustUnderstand_1(bool value)
	{
		___MustUnderstand_1 = value;
	}

	inline static int32_t get_offset_of_Name_2() { return static_cast<int32_t>(offsetof(Header_t2756440555, ___Name_2)); }
	inline String_t* get_Name_2() const { return ___Name_2; }
	inline String_t** get_address_of_Name_2() { return &___Name_2; }
	inline void set_Name_2(String_t* value)
	{
		___Name_2 = value;
		Il2CppCodeGenWriteBarrier(&___Name_2, value);
	}

	inline static int32_t get_offset_of_Value_3() { return static_cast<int32_t>(offsetof(Header_t2756440555, ___Value_3)); }
	inline Il2CppObject * get_Value_3() const { return ___Value_3; }
	inline Il2CppObject ** get_address_of_Value_3() { return &___Value_3; }
	inline void set_Value_3(Il2CppObject * value)
	{
		___Value_3 = value;
		Il2CppCodeGenWriteBarrier(&___Value_3, value);
	}
};

#ifdef __clang__
#pragma clang diagnostic pop
#endif