* ============LICENSE_START=======================================================
* ONAP Policy Model
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.models.tosca.authorative.concepts;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Map.Entry;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ToString(callSuper = true)
-public class ToscaPolicy extends ToscaEntity {
- private String type;
-
- private String typeVersion;
-
- private Map<String, Object> properties;
-
+public class ToscaPolicy extends ToscaWithTypeAndObjectProperties {
/**
* Copy constructor.
*
- * @param copyObject the obejct to copy from.
+ * @param copyObject object to copy
*/
public ToscaPolicy(@NonNull ToscaPolicy copyObject) {
super(copyObject);
-
- this.type = copyObject.type;
- this.typeVersion = copyObject.typeVersion;
-
- if (copyObject.properties != null) {
- properties = new LinkedHashMap<>();
- for (final Entry<String, Object> propertyEntry : copyObject.properties.entrySet()) {
- properties.put(propertyEntry.getKey(), propertyEntry.getValue());
- }
- }
}
}