diff options
Diffstat (limited to 'ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/compute/impl/SecurityGroupImpl.java')
-rw-r--r-- | ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/compute/impl/SecurityGroupImpl.java | 352 |
1 files changed, 352 insertions, 0 deletions
diff --git a/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/compute/impl/SecurityGroupImpl.java b/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/compute/impl/SecurityGroupImpl.java new file mode 100644 index 0000000..c99d77c --- /dev/null +++ b/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/compute/impl/SecurityGroupImpl.java @@ -0,0 +1,352 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.openstack.compute.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.openstack.compute.ComputePackage; +import org.openecomp.ncomp.openstack.compute.SecurityGroup; +import org.openecomp.ncomp.openstack.compute.SecurityRule; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Security Group</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.openstack.compute.impl.SecurityGroupImpl#getRules <em>Rules</em>}</li> + * <li>{@link org.openecomp.ncomp.openstack.compute.impl.SecurityGroupImpl#getTenant_id <em>Tenant id</em>}</li> + * <li>{@link org.openecomp.ncomp.openstack.compute.impl.SecurityGroupImpl#getId <em>Id</em>}</li> + * <li>{@link org.openecomp.ncomp.openstack.compute.impl.SecurityGroupImpl#getDescription <em>Description</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class SecurityGroupImpl extends NamedEntityImpl implements SecurityGroup { + /** + * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRules() + * @generated + * @ordered + */ + protected EList<SecurityRule> rules; + + /** + * The default value of the '{@link #getTenant_id() <em>Tenant id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTenant_id() + * @generated + * @ordered + */ + protected static final String TENANT_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTenant_id() <em>Tenant id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTenant_id() + * @generated + * @ordered + */ + protected String tenant_id = TENANT_ID_EDEFAULT; + + /** + * The default value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected static final String ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected String id = ID_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SecurityGroupImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComputePackage.Literals.SECURITY_GROUP; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<SecurityRule> getRules() { + if (rules == null) { + rules = new EObjectContainmentEList<SecurityRule>(SecurityRule.class, this, ComputePackage.SECURITY_GROUP__RULES); + } + return rules; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTenant_id() { + return tenant_id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTenant_id(String newTenant_id) { + String oldTenant_id = tenant_id; + tenant_id = newTenant_id; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.SECURITY_GROUP__TENANT_ID, oldTenant_id, tenant_id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(String newId) { + String oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.SECURITY_GROUP__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComputePackage.SECURITY_GROUP__DESCRIPTION, oldDescription, description)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ComputePackage.SECURITY_GROUP__RULES: + return ((InternalEList<?>)getRules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComputePackage.SECURITY_GROUP__RULES: + return getRules(); + case ComputePackage.SECURITY_GROUP__TENANT_ID: + return getTenant_id(); + case ComputePackage.SECURITY_GROUP__ID: + return getId(); + case ComputePackage.SECURITY_GROUP__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComputePackage.SECURITY_GROUP__RULES: + getRules().clear(); + getRules().addAll((Collection<? extends SecurityRule>)newValue); + return; + case ComputePackage.SECURITY_GROUP__TENANT_ID: + setTenant_id((String)newValue); + return; + case ComputePackage.SECURITY_GROUP__ID: + setId((String)newValue); + return; + case ComputePackage.SECURITY_GROUP__DESCRIPTION: + setDescription((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComputePackage.SECURITY_GROUP__RULES: + getRules().clear(); + return; + case ComputePackage.SECURITY_GROUP__TENANT_ID: + setTenant_id(TENANT_ID_EDEFAULT); + return; + case ComputePackage.SECURITY_GROUP__ID: + setId(ID_EDEFAULT); + return; + case ComputePackage.SECURITY_GROUP__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComputePackage.SECURITY_GROUP__RULES: + return rules != null && !rules.isEmpty(); + case ComputePackage.SECURITY_GROUP__TENANT_ID: + return TENANT_ID_EDEFAULT == null ? tenant_id != null : !TENANT_ID_EDEFAULT.equals(tenant_id); + case ComputePackage.SECURITY_GROUP__ID: + return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); + case ComputePackage.SECURITY_GROUP__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (tenant_id: "); + result.append(tenant_id); + result.append(", id: "); + result.append(id); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //SecurityGroupImpl |