diff options
Diffstat (limited to 'ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/location/impl/HypervisorServiceImpl.java')
-rw-r--r-- | ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/location/impl/HypervisorServiceImpl.java | 238 |
1 files changed, 238 insertions, 0 deletions
diff --git a/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/location/impl/HypervisorServiceImpl.java b/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/location/impl/HypervisorServiceImpl.java new file mode 100644 index 0000000..b7b5e54 --- /dev/null +++ b/ncomp-openstack-model/src/main/xcore-gen/org/openecomp/ncomp/openstack/location/impl/HypervisorServiceImpl.java @@ -0,0 +1,238 @@ + +/*- + * ============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.location.impl; + +import org.openecomp.ncomp.openstack.location.HypervisorService; +import org.openecomp.ncomp.openstack.location.LocationPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Hypervisor Service</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.openstack.location.impl.HypervisorServiceImpl#getHost <em>Host</em>}</li> + * <li>{@link org.openecomp.ncomp.openstack.location.impl.HypervisorServiceImpl#getId <em>Id</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class HypervisorServiceImpl extends MinimalEObjectImpl.Container implements HypervisorService { + /** + * The default value of the '{@link #getHost() <em>Host</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHost() + * @generated + * @ordered + */ + protected static final String HOST_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHost() <em>Host</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getHost() + * @generated + * @ordered + */ + protected String host = HOST_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 int ID_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getId() <em>Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getId() + * @generated + * @ordered + */ + protected int id = ID_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HypervisorServiceImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LocationPackage.Literals.HYPERVISOR_SERVICE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getHost() { + return host; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setHost(String newHost) { + String oldHost = host; + host = newHost; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LocationPackage.HYPERVISOR_SERVICE__HOST, oldHost, host)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getId() { + return id; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setId(int newId) { + int oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LocationPackage.HYPERVISOR_SERVICE__ID, oldId, id)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LocationPackage.HYPERVISOR_SERVICE__HOST: + return getHost(); + case LocationPackage.HYPERVISOR_SERVICE__ID: + return getId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LocationPackage.HYPERVISOR_SERVICE__HOST: + setHost((String)newValue); + return; + case LocationPackage.HYPERVISOR_SERVICE__ID: + setId((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LocationPackage.HYPERVISOR_SERVICE__HOST: + setHost(HOST_EDEFAULT); + return; + case LocationPackage.HYPERVISOR_SERVICE__ID: + setId(ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LocationPackage.HYPERVISOR_SERVICE__HOST: + return HOST_EDEFAULT == null ? host != null : !HOST_EDEFAULT.equals(host); + case LocationPackage.HYPERVISOR_SERVICE__ID: + return id != ID_EDEFAULT; + } + 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(" (host: "); + result.append(host); + result.append(", id: "); + result.append(id); + result.append(')'); + return result.toString(); + } + +} //HypervisorServiceImpl |