/** * Copyright (c) 2015-2016 Inria * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * - Fawaz Paraiso <fawaz.paraiso@inria.fr> * - Philippe Merle <philippe.merle@inria.fr> */ package org.occiware.clouddesigner.occi.cloud.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.occiware.clouddesigner.occi.cloud.CloudPackage; import org.occiware.clouddesigner.occi.cloud.Machine_ProfitBricks; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Machine Profit Bricks</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getProvider <em>Provider</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getUsername <em>Username</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getApi_key <em>Api key</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getEmail <em>Email</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getPassword <em>Password</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.cloud.impl.Machine_ProfitBricksImpl#getLocation <em>Location</em>}</li> * </ul> * * @generated */ public class Machine_ProfitBricksImpl extends MachineImpl implements Machine_ProfitBricks { /** * The default value of the '{@link #getProvider() <em>Provider</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProvider() * @generated * @ordered */ protected static final String PROVIDER_EDEFAULT = null; /** * The cached value of the '{@link #getProvider() <em>Provider</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getProvider() * @generated * @ordered */ protected String provider = PROVIDER_EDEFAULT; /** * The default value of the '{@link #getUsername() <em>Username</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUsername() * @generated * @ordered */ protected static final String USERNAME_EDEFAULT = null; /** * The cached value of the '{@link #getUsername() <em>Username</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUsername() * @generated * @ordered */ protected String username = USERNAME_EDEFAULT; /** * The default value of the '{@link #getApi_key() <em>Api key</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getApi_key() * @generated * @ordered */ protected static final String API_KEY_EDEFAULT = null; /** * The cached value of the '{@link #getApi_key() <em>Api key</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getApi_key() * @generated * @ordered */ protected String api_key = API_KEY_EDEFAULT; /** * The default value of the '{@link #getEmail() <em>Email</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getEmail() * @generated * @ordered */ protected static final String EMAIL_EDEFAULT = null; /** * The cached value of the '{@link #getEmail() <em>Email</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getEmail() * @generated * @ordered */ protected String email = EMAIL_EDEFAULT; /** * The default value of the '{@link #getPassword() <em>Password</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPassword() * @generated * @ordered */ protected static final String PASSWORD_EDEFAULT = null; /** * The cached value of the '{@link #getPassword() <em>Password</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPassword() * @generated * @ordered */ protected String password = PASSWORD_EDEFAULT; /** * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLocation() * @generated * @ordered */ protected static final String LOCATION_EDEFAULT = null; /** * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLocation() * @generated * @ordered */ protected String location = LOCATION_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Machine_ProfitBricksImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return CloudPackage.Literals.MACHINE_PROFIT_BRICKS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getProvider() { return provider; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setProvider(String newProvider) { String oldProvider = provider; provider = newProvider; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__PROVIDER, oldProvider, provider)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getUsername() { return username; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUsername(String newUsername) { String oldUsername = username; username = newUsername; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__USERNAME, oldUsername, username)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getApi_key() { return api_key; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setApi_key(String newApi_key) { String oldApi_key = api_key; api_key = newApi_key; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__API_KEY, oldApi_key, api_key)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getEmail() { return email; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setEmail(String newEmail) { String oldEmail = email; email = newEmail; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__EMAIL, oldEmail, email)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getPassword() { return password; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setPassword(String newPassword) { String oldPassword = password; password = newPassword; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__PASSWORD, oldPassword, password)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLocation() { return location; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLocation(String newLocation) { String oldLocation = location; location = newLocation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CloudPackage.MACHINE_PROFIT_BRICKS__LOCATION, oldLocation, location)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CloudPackage.MACHINE_PROFIT_BRICKS__PROVIDER: return getProvider(); case CloudPackage.MACHINE_PROFIT_BRICKS__USERNAME: return getUsername(); case CloudPackage.MACHINE_PROFIT_BRICKS__API_KEY: return getApi_key(); case CloudPackage.MACHINE_PROFIT_BRICKS__EMAIL: return getEmail(); case CloudPackage.MACHINE_PROFIT_BRICKS__PASSWORD: return getPassword(); case CloudPackage.MACHINE_PROFIT_BRICKS__LOCATION: return getLocation(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CloudPackage.MACHINE_PROFIT_BRICKS__PROVIDER: setProvider((String)newValue); return; case CloudPackage.MACHINE_PROFIT_BRICKS__USERNAME: setUsername((String)newValue); return; case CloudPackage.MACHINE_PROFIT_BRICKS__API_KEY: setApi_key((String)newValue); return; case CloudPackage.MACHINE_PROFIT_BRICKS__EMAIL: setEmail((String)newValue); return; case CloudPackage.MACHINE_PROFIT_BRICKS__PASSWORD: setPassword((String)newValue); return; case CloudPackage.MACHINE_PROFIT_BRICKS__LOCATION: setLocation((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CloudPackage.MACHINE_PROFIT_BRICKS__PROVIDER: setProvider(PROVIDER_EDEFAULT); return; case CloudPackage.MACHINE_PROFIT_BRICKS__USERNAME: setUsername(USERNAME_EDEFAULT); return; case CloudPackage.MACHINE_PROFIT_BRICKS__API_KEY: setApi_key(API_KEY_EDEFAULT); return; case CloudPackage.MACHINE_PROFIT_BRICKS__EMAIL: setEmail(EMAIL_EDEFAULT); return; case CloudPackage.MACHINE_PROFIT_BRICKS__PASSWORD: setPassword(PASSWORD_EDEFAULT); return; case CloudPackage.MACHINE_PROFIT_BRICKS__LOCATION: setLocation(LOCATION_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CloudPackage.MACHINE_PROFIT_BRICKS__PROVIDER: return PROVIDER_EDEFAULT == null ? provider != null : !PROVIDER_EDEFAULT.equals(provider); case CloudPackage.MACHINE_PROFIT_BRICKS__USERNAME: return USERNAME_EDEFAULT == null ? username != null : !USERNAME_EDEFAULT.equals(username); case CloudPackage.MACHINE_PROFIT_BRICKS__API_KEY: return API_KEY_EDEFAULT == null ? api_key != null : !API_KEY_EDEFAULT.equals(api_key); case CloudPackage.MACHINE_PROFIT_BRICKS__EMAIL: return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email); case CloudPackage.MACHINE_PROFIT_BRICKS__PASSWORD: return PASSWORD_EDEFAULT == null ? password != null : !PASSWORD_EDEFAULT.equals(password); case CloudPackage.MACHINE_PROFIT_BRICKS__LOCATION: return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); } 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(" (provider: "); result.append(provider); result.append(", username: "); result.append(username); result.append(", api_key: "); result.append(api_key); result.append(", email: "); result.append(email); result.append(", password: "); result.append(password); result.append(", location: "); result.append(location); result.append(')'); return result.toString(); } } //Machine_ProfitBricksImpl