mailslurp-client
Version:
Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.
59 lines (54 loc) • 2.18 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: contact@mailslurp.dev
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
/**
* Options for matching content using regex patterns based on Java Pattern syntax
* @export
* @interface ContentMatchOptions
*/
export interface ContentMatchOptions {
/**
* Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* @type {string}
* @memberof ContentMatchOptions
*/
pattern: string;
}
export function ContentMatchOptionsFromJSON(json: any): ContentMatchOptions {
return ContentMatchOptionsFromJSONTyped(json, false);
}
export function ContentMatchOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ContentMatchOptions {
if (json === undefined || json === null) {
return json;
}
return {
pattern: json['pattern'],
};
}
export function ContentMatchOptionsToJSON(
value?: ContentMatchOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
pattern: value.pattern,
};
}