1 /******************************************************************
3 * Copyright 2016 Samsung Electronics All Rights Reserved.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 ******************************************************************/
21 #ifndef SIMULATOR_RESOURCE_MODEL_SCHEMA_BUILDER_H_
22 #define SIMULATOR_RESOURCE_MODEL_SCHEMA_BUILDER_H_
24 #include "simulator_resource_model_schema.h"
28 class RequestResponseBody;
31 enum class VariantType;
34 class ResourceModelSchemaBuilder
37 ResourceModelSchemaBuilder(const std::shared_ptr<RAML::RequestResponseBody> &ramlSchema);
38 std::shared_ptr<SimulatorResourceModelSchema> build();
41 std::shared_ptr<AttributeProperty> buildAttribute(
42 const std::shared_ptr<RAML::Properties> &property);
44 std::shared_ptr<IntegerProperty> buildIntegerAttribute(
45 const std::shared_ptr<RAML::Properties> &property);
47 std::shared_ptr<DoubleProperty> buildDoubleAttribute(
48 const std::shared_ptr<RAML::Properties> &property);
50 std::shared_ptr<BooleanProperty> buildBooleanAttribute(
51 const std::shared_ptr<RAML::Properties> &property);
53 std::shared_ptr<StringProperty> buildStringAttribute(
54 const std::shared_ptr<RAML::Properties> &property);
56 std::shared_ptr<ArrayProperty> buildArrayAttribute(
57 const std::shared_ptr<RAML::Properties> &property);
59 std::shared_ptr<ArrayProperty> buildModelArrayAttribute(
60 const std::shared_ptr<RAML::Properties> &property);
62 std::shared_ptr<ModelProperty> buildModelAttribute(
63 const std::shared_ptr<RAML::Properties> &property);
65 void setArrayProperties(
66 const std::shared_ptr<RAML::Properties> &property,
67 const std::shared_ptr<ArrayProperty> &arrayProperty);
69 std::shared_ptr<RAML::RequestResponseBody> m_ramlSchema;