vault/ui/api-client/dist/esm/models/MongoDbAtlasWriteRoleRequest.js

58 lines
2.1 KiB
JavaScript

/* 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.21.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Check if a given object implements the MongoDbAtlasWriteRoleRequest interface.
*/
export function instanceOfMongoDbAtlasWriteRoleRequest(value) {
if (!('roles' in value) || value['roles'] === undefined)
return false;
return true;
}
export function MongoDbAtlasWriteRoleRequestFromJSON(json) {
return MongoDbAtlasWriteRoleRequestFromJSONTyped(json, false);
}
export function MongoDbAtlasWriteRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'cidrBlocks': json['cidr_blocks'] == null ? undefined : json['cidr_blocks'],
'ipAddresses': json['ip_addresses'] == null ? undefined : json['ip_addresses'],
'maxTtl': json['max_ttl'] == null ? undefined : json['max_ttl'],
'organizationId': json['organization_id'] == null ? undefined : json['organization_id'],
'projectId': json['project_id'] == null ? undefined : json['project_id'],
'projectRoles': json['project_roles'] == null ? undefined : json['project_roles'],
'roles': json['roles'],
'ttl': json['ttl'] == null ? undefined : json['ttl'],
};
}
export function MongoDbAtlasWriteRoleRequestToJSON(json) {
return MongoDbAtlasWriteRoleRequestToJSONTyped(json, false);
}
export function MongoDbAtlasWriteRoleRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'cidr_blocks': value['cidrBlocks'],
'ip_addresses': value['ipAddresses'],
'max_ttl': value['maxTtl'],
'organization_id': value['organizationId'],
'project_id': value['projectId'],
'project_roles': value['projectRoles'],
'roles': value['roles'],
'ttl': value['ttl'],
};
}