/*
* Signadot API
* API for Signadot Sandboxes
*
* OpenAPI spec version: 1.0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.4.25
*
* Do not edit the class manually.
*
*/
import {ApiClient} from '../ApiClient';
import {SandboxEndpoint} from './SandboxEndpoint';
import {SandboxFork} from './SandboxFork';
import {SandboxResource} from './SandboxResource';
/**
* The CreateSandboxRequest model module.
* @module model/CreateSandboxRequest
*/
export class CreateSandboxRequest {
/**
* Constructs a new <code>CreateSandboxRequest</code>.
* @alias module:model/CreateSandboxRequest
* @class
* @param cluster {String} Cluster within which this sandbox should be created
* @param forks {Array.<module:model/SandboxFork>} Forks is the specification of each forked entity
*/
constructor(cluster, forks) {
this.cluster = cluster;
this.forks = forks;
}
/**
* Constructs a <code>CreateSandboxRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @param {module:model/CreateSandboxRequest} obj Optional instance to populate.
* @return {module:model/CreateSandboxRequest} The populated <code>CreateSandboxRequest</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new CreateSandboxRequest();
if (data.hasOwnProperty('cluster'))
obj.cluster = ApiClient.convertToType(data['cluster'], 'String');
if (data.hasOwnProperty('description'))
obj.description = ApiClient.convertToType(data['description'], 'String');
if (data.hasOwnProperty('endpoints'))
obj.endpoints = ApiClient.convertToType(data['endpoints'], [SandboxEndpoint]);
if (data.hasOwnProperty('forks'))
obj.forks = ApiClient.convertToType(data['forks'], [SandboxFork]);
if (data.hasOwnProperty('name'))
obj.name = ApiClient.convertToType(data['name'], 'String');
if (data.hasOwnProperty('resources'))
obj.resources = ApiClient.convertToType(data['resources'], [SandboxResource]);
}
return obj;
}
}
/**
* Cluster within which this sandbox should be created
* @member {String} cluster
*/
CreateSandboxRequest.prototype.cluster = undefined;
/**
* Description of the purpose of this sandbox
* @member {String} description
*/
CreateSandboxRequest.prototype.description = undefined;
/**
* Endpoints that can be used to point to external DNS names or ingress gateways
* @member {Array.<module:model/SandboxEndpoint>} endpoints
*/
CreateSandboxRequest.prototype.endpoints = undefined;
/**
* Forks is the specification of each forked entity
* @member {Array.<module:model/SandboxFork>} forks
*/
CreateSandboxRequest.prototype.forks = undefined;
/**
* Human-readable name of this sandbox
* @member {String} name
*/
CreateSandboxRequest.prototype.name = undefined;
/**
* Resources specifies each required resource to spin up the sandbox
* @member {Array.<module:model/SandboxResource>} resources
*/
CreateSandboxRequest.prototype.resources = undefined;