vault/ui/api-client/dist/models/CreateCustomMessageRequest.js

69 lines
2.7 KiB
JavaScript

"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* HashiCorp Vault API
* HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`.
*
* The version of the OpenAPI document: 1.20.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfCreateCustomMessageRequest = instanceOfCreateCustomMessageRequest;
exports.CreateCustomMessageRequestFromJSON = CreateCustomMessageRequestFromJSON;
exports.CreateCustomMessageRequestFromJSONTyped = CreateCustomMessageRequestFromJSONTyped;
exports.CreateCustomMessageRequestToJSON = CreateCustomMessageRequestToJSON;
exports.CreateCustomMessageRequestToJSONTyped = CreateCustomMessageRequestToJSONTyped;
/**
* Check if a given object implements the CreateCustomMessageRequest interface.
*/
function instanceOfCreateCustomMessageRequest(value) {
if (!('message' in value) || value['message'] === undefined)
return false;
if (!('startTime' in value) || value['startTime'] === undefined)
return false;
if (!('title' in value) || value['title'] === undefined)
return false;
return true;
}
function CreateCustomMessageRequestFromJSON(json) {
return CreateCustomMessageRequestFromJSONTyped(json, false);
}
function CreateCustomMessageRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'authenticated': json['authenticated'] == null ? undefined : json['authenticated'],
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
'link': json['link'] == null ? undefined : json['link'],
'message': json['message'],
'options': json['options'] == null ? undefined : json['options'],
'startTime': (new Date(json['start_time'])),
'title': json['title'],
'type': json['type'] == null ? undefined : json['type'],
};
}
function CreateCustomMessageRequestToJSON(json) {
return CreateCustomMessageRequestToJSONTyped(json, false);
}
function CreateCustomMessageRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'authenticated': value['authenticated'],
'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()),
'link': value['link'],
'message': value['message'],
'options': value['options'],
'start_time': ((value['startTime']).toISOString()),
'title': value['title'],
'type': value['type'],
};
}