/*- * ============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.neutron.impl; import org.openecomp.ncomp.openstack.neutron.BindingProfile; import org.openecomp.ncomp.openstack.neutron.BindingVifDetail; import org.openecomp.ncomp.openstack.neutron.ExternalGateway; import org.openecomp.ncomp.openstack.neutron.FixedIp; import org.openecomp.ncomp.openstack.neutron.NeutronPackage; import org.openecomp.ncomp.openstack.neutron.Port; 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.EDataTypeEList; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Port'. * *

* The following features are implemented: *

*

* * @generated */ public class PortImpl extends NeutronObjectImpl implements Port { /** * The default value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected static final String ID_EDEFAULT = null; /** * The cached value of the '{@link #getId() Id}' attribute. * * * @see #getId() * @generated * @ordered */ protected String id = ID_EDEFAULT; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected String name = NAME_EDEFAULT; /** * The default value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ protected static final String STATUS_EDEFAULT = null; /** * The cached value of the '{@link #getStatus() Status}' attribute. * * * @see #getStatus() * @generated * @ordered */ protected String status = STATUS_EDEFAULT; /** * The default value of the '{@link #getAdmin_state_up() Admin state up}' attribute. * * * @see #getAdmin_state_up() * @generated * @ordered */ protected static final Boolean ADMIN_STATE_UP_EDEFAULT = null; /** * The cached value of the '{@link #getAdmin_state_up() Admin state up}' attribute. * * * @see #getAdmin_state_up() * @generated * @ordered */ protected Boolean admin_state_up = ADMIN_STATE_UP_EDEFAULT; /** * The cached value of the '{@link #getExternal_gateway_info() External gateway info}' containment reference. * * * @see #getExternal_gateway_info() * @generated * @ordered */ protected ExternalGateway external_gateway_info; /** * The default value of the '{@link #getTenant_id() Tenant id}' attribute. * * * @see #getTenant_id() * @generated * @ordered */ protected static final String TENANT_ID_EDEFAULT = null; /** * The cached value of the '{@link #getTenant_id() Tenant id}' attribute. * * * @see #getTenant_id() * @generated * @ordered */ protected String tenant_id = TENANT_ID_EDEFAULT; /** * The cached value of the '{@link #getAllowed_address_pairs() Allowed address pairs}' attribute list. * * * @see #getAllowed_address_pairs() * @generated * @ordered */ protected EList allowed_address_pairs; /** * The default value of the '{@link #getBinding_host_id() Binding host id}' attribute. * * * @see #getBinding_host_id() * @generated * @ordered */ protected static final String BINDING_HOST_ID_EDEFAULT = null; /** * The cached value of the '{@link #getBinding_host_id() Binding host id}' attribute. * * * @see #getBinding_host_id() * @generated * @ordered */ protected String binding_host_id = BINDING_HOST_ID_EDEFAULT; /** * The cached value of the '{@link #getBinding_profile() Binding profile}' containment reference. * * * @see #getBinding_profile() * @generated * @ordered */ protected BindingProfile binding_profile; /** * The cached value of the '{@link #getBinding_vif_details() Binding vif details}' containment reference. * * * @see #getBinding_vif_details() * @generated * @ordered */ protected BindingVifDetail binding_vif_details; /** * The default value of the '{@link #getBinding_vif_type() Binding vif type}' attribute. * * * @see #getBinding_vif_type() * @generated * @ordered */ protected static final String BINDING_VIF_TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getBinding_vif_type() Binding vif type}' attribute. * * * @see #getBinding_vif_type() * @generated * @ordered */ protected String binding_vif_type = BINDING_VIF_TYPE_EDEFAULT; /** * The default value of the '{@link #getBinding_vnic_type() Binding vnic type}' attribute. * * * @see #getBinding_vnic_type() * @generated * @ordered */ protected static final String BINDING_VNIC_TYPE_EDEFAULT = null; /** * The cached value of the '{@link #getBinding_vnic_type() Binding vnic type}' attribute. * * * @see #getBinding_vnic_type() * @generated * @ordered */ protected String binding_vnic_type = BINDING_VNIC_TYPE_EDEFAULT; /** * The default value of the '{@link #getDevice_id() Device id}' attribute. * * * @see #getDevice_id() * @generated * @ordered */ protected static final String DEVICE_ID_EDEFAULT = null; /** * The cached value of the '{@link #getDevice_id() Device id}' attribute. * * * @see #getDevice_id() * @generated * @ordered */ protected String device_id = DEVICE_ID_EDEFAULT; /** * The default value of the '{@link #getDevice_owner() Device owner}' attribute. * * * @see #getDevice_owner() * @generated * @ordered */ protected static final String DEVICE_OWNER_EDEFAULT = null; /** * The cached value of the '{@link #getDevice_owner() Device owner}' attribute. * * * @see #getDevice_owner() * @generated * @ordered */ protected String device_owner = DEVICE_OWNER_EDEFAULT; /** * The cached value of the '{@link #getExtra_dhcp_opts() Extra dhcp opts}' attribute list. * * * @see #getExtra_dhcp_opts() * @generated * @ordered */ protected EList extra_dhcp_opts; /** * The cached value of the '{@link #getFixed_ips() Fixed ips}' containment reference list. * * * @see #getFixed_ips() * @generated * @ordered */ protected EList fixed_ips; /** * The default value of the '{@link #getMac_address() Mac address}' attribute. * * * @see #getMac_address() * @generated * @ordered */ protected static final String MAC_ADDRESS_EDEFAULT = null; /** * The cached value of the '{@link #getMac_address() Mac address}' attribute. * * * @see #getMac_address() * @generated * @ordered */ protected String mac_address = MAC_ADDRESS_EDEFAULT; /** * The default value of the '{@link #getNetwork_id() Network id}' attribute. * * * @see #getNetwork_id() * @generated * @ordered */ protected static final String NETWORK_ID_EDEFAULT = null; /** * The cached value of the '{@link #getNetwork_id() Network id}' attribute. * * * @see #getNetwork_id() * @generated * @ordered */ protected String network_id = NETWORK_ID_EDEFAULT; /** * The cached value of the '{@link #getSecurity_groups() Security groups}' attribute list. * * * @see #getSecurity_groups() * @generated * @ordered */ protected EList security_groups; /** * * * @generated */ protected PortImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return NeutronPackage.Literals.PORT; } /** * * * @generated */ public String getId() { return id; } /** * * * @generated */ public void setId(String newId) { String oldId = id; id = newId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__ID, oldId, id)); } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__NAME, oldName, name)); } /** * * * @generated */ public String getStatus() { return status; } /** * * * @generated */ public void setStatus(String newStatus) { String oldStatus = status; status = newStatus; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__STATUS, oldStatus, status)); } /** * * * @generated */ public Boolean getAdmin_state_up() { return admin_state_up; } /** * * * @generated */ public void setAdmin_state_up(Boolean newAdmin_state_up) { Boolean oldAdmin_state_up = admin_state_up; admin_state_up = newAdmin_state_up; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__ADMIN_STATE_UP, oldAdmin_state_up, admin_state_up)); } /** * * * @generated */ public ExternalGateway getExternal_gateway_info() { return external_gateway_info; } /** * * * @generated */ public NotificationChain basicSetExternal_gateway_info(ExternalGateway newExternal_gateway_info, NotificationChain msgs) { ExternalGateway oldExternal_gateway_info = external_gateway_info; external_gateway_info = newExternal_gateway_info; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO, oldExternal_gateway_info, newExternal_gateway_info); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setExternal_gateway_info(ExternalGateway newExternal_gateway_info) { if (newExternal_gateway_info != external_gateway_info) { NotificationChain msgs = null; if (external_gateway_info != null) msgs = ((InternalEObject)external_gateway_info).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO, null, msgs); if (newExternal_gateway_info != null) msgs = ((InternalEObject)newExternal_gateway_info).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO, null, msgs); msgs = basicSetExternal_gateway_info(newExternal_gateway_info, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO, newExternal_gateway_info, newExternal_gateway_info)); } /** * * * @generated */ public String getTenant_id() { return tenant_id; } /** * * * @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, NeutronPackage.PORT__TENANT_ID, oldTenant_id, tenant_id)); } /** * * * @generated */ public EList getAllowed_address_pairs() { if (allowed_address_pairs == null) { allowed_address_pairs = new EDataTypeEList(String.class, this, NeutronPackage.PORT__ALLOWED_ADDRESS_PAIRS); } return allowed_address_pairs; } /** * * * @generated */ public String getBinding_host_id() { return binding_host_id; } /** * * * @generated */ public void setBinding_host_id(String newBinding_host_id) { String oldBinding_host_id = binding_host_id; binding_host_id = newBinding_host_id; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_HOST_ID, oldBinding_host_id, binding_host_id)); } /** * * * @generated */ public BindingProfile getBinding_profile() { return binding_profile; } /** * * * @generated */ public NotificationChain basicSetBinding_profile(BindingProfile newBinding_profile, NotificationChain msgs) { BindingProfile oldBinding_profile = binding_profile; binding_profile = newBinding_profile; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_PROFILE, oldBinding_profile, newBinding_profile); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setBinding_profile(BindingProfile newBinding_profile) { if (newBinding_profile != binding_profile) { NotificationChain msgs = null; if (binding_profile != null) msgs = ((InternalEObject)binding_profile).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__BINDING_PROFILE, null, msgs); if (newBinding_profile != null) msgs = ((InternalEObject)newBinding_profile).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__BINDING_PROFILE, null, msgs); msgs = basicSetBinding_profile(newBinding_profile, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_PROFILE, newBinding_profile, newBinding_profile)); } /** * * * @generated */ public BindingVifDetail getBinding_vif_details() { return binding_vif_details; } /** * * * @generated */ public NotificationChain basicSetBinding_vif_details(BindingVifDetail newBinding_vif_details, NotificationChain msgs) { BindingVifDetail oldBinding_vif_details = binding_vif_details; binding_vif_details = newBinding_vif_details; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_VIF_DETAILS, oldBinding_vif_details, newBinding_vif_details); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setBinding_vif_details(BindingVifDetail newBinding_vif_details) { if (newBinding_vif_details != binding_vif_details) { NotificationChain msgs = null; if (binding_vif_details != null) msgs = ((InternalEObject)binding_vif_details).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__BINDING_VIF_DETAILS, null, msgs); if (newBinding_vif_details != null) msgs = ((InternalEObject)newBinding_vif_details).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NeutronPackage.PORT__BINDING_VIF_DETAILS, null, msgs); msgs = basicSetBinding_vif_details(newBinding_vif_details, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_VIF_DETAILS, newBinding_vif_details, newBinding_vif_details)); } /** * * * @generated */ public String getBinding_vif_type() { return binding_vif_type; } /** * * * @generated */ public void setBinding_vif_type(String newBinding_vif_type) { String oldBinding_vif_type = binding_vif_type; binding_vif_type = newBinding_vif_type; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_VIF_TYPE, oldBinding_vif_type, binding_vif_type)); } /** * * * @generated */ public String getBinding_vnic_type() { return binding_vnic_type; } /** * * * @generated */ public void setBinding_vnic_type(String newBinding_vnic_type) { String oldBinding_vnic_type = binding_vnic_type; binding_vnic_type = newBinding_vnic_type; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__BINDING_VNIC_TYPE, oldBinding_vnic_type, binding_vnic_type)); } /** * * * @generated */ public String getDevice_id() { return device_id; } /** * * * @generated */ public void setDevice_id(String newDevice_id) { String oldDevice_id = device_id; device_id = newDevice_id; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__DEVICE_ID, oldDevice_id, device_id)); } /** * * * @generated */ public String getDevice_owner() { return device_owner; } /** * * * @generated */ public void setDevice_owner(String newDevice_owner) { String oldDevice_owner = device_owner; device_owner = newDevice_owner; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__DEVICE_OWNER, oldDevice_owner, device_owner)); } /** * * * @generated */ public EList getExtra_dhcp_opts() { if (extra_dhcp_opts == null) { extra_dhcp_opts = new EDataTypeEList(String.class, this, NeutronPackage.PORT__EXTRA_DHCP_OPTS); } return extra_dhcp_opts; } /** * * * @generated */ public EList getFixed_ips() { if (fixed_ips == null) { fixed_ips = new EObjectContainmentEList(FixedIp.class, this, NeutronPackage.PORT__FIXED_IPS); } return fixed_ips; } /** * * * @generated */ public String getMac_address() { return mac_address; } /** * * * @generated */ public void setMac_address(String newMac_address) { String oldMac_address = mac_address; mac_address = newMac_address; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__MAC_ADDRESS, oldMac_address, mac_address)); } /** * * * @generated */ public String getNetwork_id() { return network_id; } /** * * * @generated */ public void setNetwork_id(String newNetwork_id) { String oldNetwork_id = network_id; network_id = newNetwork_id; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, NeutronPackage.PORT__NETWORK_ID, oldNetwork_id, network_id)); } /** * * * @generated */ public EList getSecurity_groups() { if (security_groups == null) { security_groups = new EDataTypeEList(String.class, this, NeutronPackage.PORT__SECURITY_GROUPS); } return security_groups; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO: return basicSetExternal_gateway_info(null, msgs); case NeutronPackage.PORT__BINDING_PROFILE: return basicSetBinding_profile(null, msgs); case NeutronPackage.PORT__BINDING_VIF_DETAILS: return basicSetBinding_vif_details(null, msgs); case NeutronPackage.PORT__FIXED_IPS: return ((InternalEList)getFixed_ips()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case NeutronPackage.PORT__ID: return getId(); case NeutronPackage.PORT__NAME: return getName(); case NeutronPackage.PORT__STATUS: return getStatus(); case NeutronPackage.PORT__ADMIN_STATE_UP: return getAdmin_state_up(); case NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO: return getExternal_gateway_info(); case NeutronPackage.PORT__TENANT_ID: return getTenant_id(); case NeutronPackage.PORT__ALLOWED_ADDRESS_PAIRS: return getAllowed_address_pairs(); case NeutronPackage.PORT__BINDING_HOST_ID: return getBinding_host_id(); case NeutronPackage.PORT__BINDING_PROFILE: return getBinding_profile(); case NeutronPackage.PORT__BINDING_VIF_DETAILS: return getBinding_vif_details(); case NeutronPackage.PORT__BINDING_VIF_TYPE: return getBinding_vif_type(); case NeutronPackage.PORT__BINDING_VNIC_TYPE: return getBinding_vnic_type(); case NeutronPackage.PORT__DEVICE_ID: return getDevice_id(); case NeutronPackage.PORT__DEVICE_OWNER: return getDevice_owner(); case NeutronPackage.PORT__EXTRA_DHCP_OPTS: return getExtra_dhcp_opts(); case NeutronPackage.PORT__FIXED_IPS: return getFixed_ips(); case NeutronPackage.PORT__MAC_ADDRESS: return getMac_address(); case NeutronPackage.PORT__NETWORK_ID: return getNetwork_id(); case NeutronPackage.PORT__SECURITY_GROUPS: return getSecurity_groups(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case NeutronPackage.PORT__ID: setId((String)newValue); return; case NeutronPackage.PORT__NAME: setName((String)newValue); return; case NeutronPackage.PORT__STATUS: setStatus((String)newValue); return; case NeutronPackage.PORT__ADMIN_STATE_UP: setAdmin_state_up((Boolean)newValue); return; case NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO: setExternal_gateway_info((ExternalGateway)newValue); return; case NeutronPackage.PORT__TENANT_ID: setTenant_id((String)newValue); return; case NeutronPackage.PORT__ALLOWED_ADDRESS_PAIRS: getAllowed_address_pairs().clear(); getAllowed_address_pairs().addAll((Collection)newValue); return; case NeutronPackage.PORT__BINDING_HOST_ID: setBinding_host_id((String)newValue); return; case NeutronPackage.PORT__BINDING_PROFILE: setBinding_profile((BindingProfile)newValue); return; case NeutronPackage.PORT__BINDING_VIF_DETAILS: setBinding_vif_details((BindingVifDetail)newValue); return; case NeutronPackage.PORT__BINDING_VIF_TYPE: setBinding_vif_type((String)newValue); return; case NeutronPackage.PORT__BINDING_VNIC_TYPE: setBinding_vnic_type((String)newValue); return; case NeutronPackage.PORT__DEVICE_ID: setDevice_id((String)newValue); return; case NeutronPackage.PORT__DEVICE_OWNER: setDevice_owner((String)newValue); return; case NeutronPackage.PORT__EXTRA_DHCP_OPTS: getExtra_dhcp_opts().clear(); getExtra_dhcp_opts().addAll((Collection)newValue); return; case NeutronPackage.PORT__FIXED_IPS: getFixed_ips().clear(); getFixed_ips().addAll((Collection)newValue); return; case NeutronPackage.PORT__MAC_ADDRESS: setMac_address((String)newValue); return; case NeutronPackage.PORT__NETWORK_ID: setNetwork_id((String)newValue); return; case NeutronPackage.PORT__SECURITY_GROUPS: getSecurity_groups().clear(); getSecurity_groups().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case NeutronPackage.PORT__ID: setId(ID_EDEFAULT); return; case NeutronPackage.PORT__NAME: setName(NAME_EDEFAULT); return; case NeutronPackage.PORT__STATUS: setStatus(STATUS_EDEFAULT); return; case NeutronPackage.PORT__ADMIN_STATE_UP: setAdmin_state_up(ADMIN_STATE_UP_EDEFAULT); return; case NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO: setExternal_gateway_info((ExternalGateway)null); return; case NeutronPackage.PORT__TENANT_ID: setTenant_id(TENANT_ID_EDEFAULT); return; case NeutronPackage.PORT__ALLOWED_ADDRESS_PAIRS: getAllowed_address_pairs().clear(); return; case NeutronPackage.PORT__BINDING_HOST_ID: setBinding_host_id(BINDING_HOST_ID_EDEFAULT); return; case NeutronPackage.PORT__BINDING_PROFILE: setBinding_profile((BindingProfile)null); return; case NeutronPackage.PORT__BINDING_VIF_DETAILS: setBinding_vif_details((BindingVifDetail)null); return; case NeutronPackage.PORT__BINDING_VIF_TYPE: setBinding_vif_type(BINDING_VIF_TYPE_EDEFAULT); return; case NeutronPackage.PORT__BINDING_VNIC_TYPE: setBinding_vnic_type(BINDING_VNIC_TYPE_EDEFAULT); return; case NeutronPackage.PORT__DEVICE_ID: setDevice_id(DEVICE_ID_EDEFAULT); return; case NeutronPackage.PORT__DEVICE_OWNER: setDevice_owner(DEVICE_OWNER_EDEFAULT); return; case NeutronPackage.PORT__EXTRA_DHCP_OPTS: getExtra_dhcp_opts().clear(); return; case NeutronPackage.PORT__FIXED_IPS: getFixed_ips().clear(); return; case NeutronPackage.PORT__MAC_ADDRESS: setMac_address(MAC_ADDRESS_EDEFAULT); return; case NeutronPackage.PORT__NETWORK_ID: setNetwork_id(NETWORK_ID_EDEFAULT); return; case NeutronPackage.PORT__SECURITY_GROUPS: getSecurity_groups().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case NeutronPackage.PORT__ID: return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); case NeutronPackage.PORT__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); case NeutronPackage.PORT__STATUS: return STATUS_EDEFAULT == null ? status != null : !STATUS_EDEFAULT.equals(status); case NeutronPackage.PORT__ADMIN_STATE_UP: return ADMIN_STATE_UP_EDEFAULT == null ? admin_state_up != null : !ADMIN_STATE_UP_EDEFAULT.equals(admin_state_up); case NeutronPackage.PORT__EXTERNAL_GATEWAY_INFO: return external_gateway_info != null; case NeutronPackage.PORT__TENANT_ID: return TENANT_ID_EDEFAULT == null ? tenant_id != null : !TENANT_ID_EDEFAULT.equals(tenant_id); case NeutronPackage.PORT__ALLOWED_ADDRESS_PAIRS: return allowed_address_pairs != null && !allowed_address_pairs.isEmpty(); case NeutronPackage.PORT__BINDING_HOST_ID: return BINDING_HOST_ID_EDEFAULT == null ? binding_host_id != null : !BINDING_HOST_ID_EDEFAULT.equals(binding_host_id); case NeutronPackage.PORT__BINDING_PROFILE: return binding_profile != null; case NeutronPackage.PORT__BINDING_VIF_DETAILS: return binding_vif_details != null; case NeutronPackage.PORT__BINDING_VIF_TYPE: return BINDING_VIF_TYPE_EDEFAULT == null ? binding_vif_type != null : !BINDING_VIF_TYPE_EDEFAULT.equals(binding_vif_type); case NeutronPackage.PORT__BINDING_VNIC_TYPE: return BINDING_VNIC_TYPE_EDEFAULT == null ? binding_vnic_type != null : !BINDING_VNIC_TYPE_EDEFAULT.equals(binding_vnic_type); case NeutronPackage.PORT__DEVICE_ID: return DEVICE_ID_EDEFAULT == null ? device_id != null : !DEVICE_ID_EDEFAULT.equals(device_id); case NeutronPackage.PORT__DEVICE_OWNER: return DEVICE_OWNER_EDEFAULT == null ? device_owner != null : !DEVICE_OWNER_EDEFAULT.equals(device_owner); case NeutronPackage.PORT__EXTRA_DHCP_OPTS: return extra_dhcp_opts != null && !extra_dhcp_opts.isEmpty(); case NeutronPackage.PORT__FIXED_IPS: return fixed_ips != null && !fixed_ips.isEmpty(); case NeutronPackage.PORT__MAC_ADDRESS: return MAC_ADDRESS_EDEFAULT == null ? mac_address != null : !MAC_ADDRESS_EDEFAULT.equals(mac_address); case NeutronPackage.PORT__NETWORK_ID: return NETWORK_ID_EDEFAULT == null ? network_id != null : !NETWORK_ID_EDEFAULT.equals(network_id); case NeutronPackage.PORT__SECURITY_GROUPS: return security_groups != null && !security_groups.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (id: "); result.append(id); result.append(", name: "); result.append(name); result.append(", status: "); result.append(status); result.append(", admin_state_up: "); result.append(admin_state_up); result.append(", tenant_id: "); result.append(tenant_id); result.append(", allowed_address_pairs: "); result.append(allowed_address_pairs); result.append(", binding_host_id: "); result.append(binding_host_id); result.append(", binding_vif_type: "); result.append(binding_vif_type); result.append(", binding_vnic_type: "); result.append(binding_vnic_type); result.append(", device_id: "); result.append(device_id); result.append(", device_owner: "); result.append(device_owner); result.append(", extra_dhcp_opts: "); result.append(extra_dhcp_opts); result.append(", mac_address: "); result.append(mac_address); result.append(", network_id: "); result.append(network_id); result.append(", security_groups: "); result.append(security_groups); result.append(')'); return result.toString(); } } //PortImpl