blob: 7ecc85c30290a38234b7bca5e78ae61ee515847a [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001/*-
2 * ============LICENSE_START=======================================================
3 * SDC
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
19 */
20/**
21 * Created by osonsino on 16/05/2016.
22 */
23/// <reference path="../references"/>
24module Sdc.Models {
25 'use strict';
26
27 export class SchemaPropertyGroupModel{
28 property: SchemaProperty;
29
30 constructor(schemaProperty?:Models.SchemaProperty) {
31 this.property = schemaProperty;
32 }
33 }
34
35 export class SchemaProperty {
36
37 type: string;
38 required: boolean;
39 definition: boolean;
40 description: string;
41 password: boolean;
42 //custom properties
43 simpleType: string;
44
45 constructor(schemaProperty?:SchemaProperty) {
46 if(schemaProperty) {
47 this.type = schemaProperty.type;
48 this.required = schemaProperty.required;
49 this.definition = schemaProperty.definition;
50 this.description = schemaProperty.description;
51 this.password = schemaProperty.password;
52 this.simpleType = schemaProperty.simpleType;
53 }
54 }
55
56 public toJSON = ():any => {
57 this.simpleType = undefined;
58 return this;
59 };
60 }
61}
62
63