diff options
Diffstat (limited to 'ncomp-docker-model/src/main/xcore-gen/org/openecomp/ncomp/docker/impl/ContainerPortBindingsImpl.java')
-rw-r--r-- | ncomp-docker-model/src/main/xcore-gen/org/openecomp/ncomp/docker/impl/ContainerPortBindingsImpl.java | 293 |
1 files changed, 293 insertions, 0 deletions
diff --git a/ncomp-docker-model/src/main/xcore-gen/org/openecomp/ncomp/docker/impl/ContainerPortBindingsImpl.java b/ncomp-docker-model/src/main/xcore-gen/org/openecomp/ncomp/docker/impl/ContainerPortBindingsImpl.java new file mode 100644 index 0000000..5e47609 --- /dev/null +++ b/ncomp-docker-model/src/main/xcore-gen/org/openecomp/ncomp/docker/impl/ContainerPortBindingsImpl.java @@ -0,0 +1,293 @@ + +/*- + * ============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.docker.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.docker.ContainerPortBindings; +import org.openecomp.ncomp.docker.DockerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Container Port Bindings</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.docker.impl.ContainerPortBindingsImpl#getContainerPort <em>Container Port</em>}</li> + * <li>{@link org.openecomp.ncomp.docker.impl.ContainerPortBindingsImpl#getProtocol <em>Protocol</em>}</li> + * <li>{@link org.openecomp.ncomp.docker.impl.ContainerPortBindingsImpl#getVmPort <em>Vm Port</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ContainerPortBindingsImpl extends NamedEntityImpl implements ContainerPortBindings { + /** + * The default value of the '{@link #getContainerPort() <em>Container Port</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContainerPort() + * @generated + * @ordered + */ + protected static final int CONTAINER_PORT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getContainerPort() <em>Container Port</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getContainerPort() + * @generated + * @ordered + */ + protected int containerPort = CONTAINER_PORT_EDEFAULT; + + /** + * The default value of the '{@link #getProtocol() <em>Protocol</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getProtocol() + * @generated + * @ordered + */ + protected static final String PROTOCOL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getProtocol() <em>Protocol</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getProtocol() + * @generated + * @ordered + */ + protected String protocol = PROTOCOL_EDEFAULT; + + /** + * The default value of the '{@link #getVmPort() <em>Vm Port</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmPort() + * @generated + * @ordered + */ + protected static final int VM_PORT_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getVmPort() <em>Vm Port</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getVmPort() + * @generated + * @ordered + */ + protected int vmPort = VM_PORT_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ContainerPortBindingsImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return DockerPackage.Literals.CONTAINER_PORT_BINDINGS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getContainerPort() { + return containerPort; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setContainerPort(int newContainerPort) { + int oldContainerPort = containerPort; + containerPort = newContainerPort; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.CONTAINER_PORT_BINDINGS__CONTAINER_PORT, oldContainerPort, containerPort)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getProtocol() { + return protocol; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setProtocol(String newProtocol) { + String oldProtocol = protocol; + protocol = newProtocol; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.CONTAINER_PORT_BINDINGS__PROTOCOL, oldProtocol, protocol)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getVmPort() { + return vmPort; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setVmPort(int newVmPort) { + int oldVmPort = vmPort; + vmPort = newVmPort; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DockerPackage.CONTAINER_PORT_BINDINGS__VM_PORT, oldVmPort, vmPort)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DockerPackage.CONTAINER_PORT_BINDINGS__CONTAINER_PORT: + return getContainerPort(); + case DockerPackage.CONTAINER_PORT_BINDINGS__PROTOCOL: + return getProtocol(); + case DockerPackage.CONTAINER_PORT_BINDINGS__VM_PORT: + return getVmPort(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DockerPackage.CONTAINER_PORT_BINDINGS__CONTAINER_PORT: + setContainerPort((Integer)newValue); + return; + case DockerPackage.CONTAINER_PORT_BINDINGS__PROTOCOL: + setProtocol((String)newValue); + return; + case DockerPackage.CONTAINER_PORT_BINDINGS__VM_PORT: + setVmPort((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DockerPackage.CONTAINER_PORT_BINDINGS__CONTAINER_PORT: + setContainerPort(CONTAINER_PORT_EDEFAULT); + return; + case DockerPackage.CONTAINER_PORT_BINDINGS__PROTOCOL: + setProtocol(PROTOCOL_EDEFAULT); + return; + case DockerPackage.CONTAINER_PORT_BINDINGS__VM_PORT: + setVmPort(VM_PORT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DockerPackage.CONTAINER_PORT_BINDINGS__CONTAINER_PORT: + return containerPort != CONTAINER_PORT_EDEFAULT; + case DockerPackage.CONTAINER_PORT_BINDINGS__PROTOCOL: + return PROTOCOL_EDEFAULT == null ? protocol != null : !PROTOCOL_EDEFAULT.equals(protocol); + case DockerPackage.CONTAINER_PORT_BINDINGS__VM_PORT: + return vmPort != VM_PORT_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(" (containerPort: "); + result.append(containerPort); + result.append(", protocol: "); + result.append(protocol); + result.append(", vmPort: "); + result.append(vmPort); + result.append(')'); + return result.toString(); + } + +} //ContainerPortBindingsImpl |