Initial import of CFM and SOAM api

Change-Id: Icf5cc2d5fb34b75460e80e8cced0d70265bcd33b
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStat.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStat.java
new file mode 100644
index 0000000..0616a55
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStat.java
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+
+/**
+ * The default implementation of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}.
+ */
+public abstract class DefaultLaStat implements LossAvailabilityStat {
+    private final Duration elapsedTime;
+    private final boolean suspectStatus;
+    private final Long forwardHighLoss;
+    private final Long backwardHighLoss;
+    private final Long forwardConsecutiveHighLoss;
+    private final Long backwardConsecutiveHighLoss;
+    private final Long forwardAvailable;
+    private final Long backwardAvailable;
+    private final Long forwardUnavailable;
+    private final Long backwardUnavailable;
+    private final MilliPct forwardMinFrameLossRatio;
+    private final MilliPct forwardMaxFrameLossRatio;
+    private final MilliPct forwardAverageFrameLossRatio;
+    private final MilliPct backwardMinFrameLossRatio;
+    private final MilliPct backwardMaxFrameLossRatio;
+    private final MilliPct backwardAverageFrameLossRatio;
+
+    protected DefaultLaStat(DefaultLaStatBuilder builder) {
+        this.elapsedTime = builder.elapsedTime;
+        this.suspectStatus = builder.suspectStatus;
+        this.forwardHighLoss = builder.forwardHighLoss;
+        this.backwardHighLoss = builder.backwardHighLoss;
+        this.forwardConsecutiveHighLoss = builder.forwardConsecutiveHighLoss;
+        this.backwardConsecutiveHighLoss = builder.backwardConsecutiveHighLoss;
+        this.forwardAvailable = builder.forwardAvailable;
+        this.backwardAvailable = builder.backwardAvailable;
+        this.forwardUnavailable = builder.forwardUnavailable;
+        this.backwardUnavailable = builder.backwardUnavailable;
+        this.forwardMinFrameLossRatio = builder.forwardMinFrameLossRatio;
+        this.forwardMaxFrameLossRatio = builder.forwardMaxFrameLossRatio;
+        this.forwardAverageFrameLossRatio = builder.forwardAverageFrameLossRatio;
+        this.backwardMinFrameLossRatio = builder.backwardMinFrameLossRatio;
+        this.backwardMaxFrameLossRatio = builder.backwardMaxFrameLossRatio;
+        this.backwardAverageFrameLossRatio = builder.backwardAverageFrameLossRatio;
+    }
+
+    @Override
+    public Duration elapsedTime() {
+        return elapsedTime;
+    }
+
+    @Override
+    public boolean suspectStatus() {
+        return suspectStatus;
+    }
+
+    @Override
+    public Long forwardHighLoss() {
+        return forwardHighLoss;
+    }
+
+    @Override
+    public Long backwardHighLoss() {
+        return backwardHighLoss;
+    }
+
+    @Override
+    public Long forwardConsecutiveHighLoss() {
+        return forwardConsecutiveHighLoss;
+    }
+
+    @Override
+    public Long backwardConsecutiveHighLoss() {
+        return backwardConsecutiveHighLoss;
+    }
+
+    @Override
+    public Long forwardAvailable() {
+        return forwardAvailable;
+    }
+
+    @Override
+    public Long backwardAvailable() {
+        return backwardAvailable;
+    }
+
+    @Override
+    public Long forwardUnavailable() {
+        return forwardUnavailable;
+    }
+
+    @Override
+    public Long backwardUnavailable() {
+        return backwardUnavailable;
+    }
+
+    @Override
+    public MilliPct forwardMinFrameLossRatio() {
+        return forwardMinFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct forwardMaxFrameLossRatio() {
+        return forwardMaxFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct forwardAverageFrameLossRatio() {
+        return forwardAverageFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct backwardMinFrameLossRatio() {
+        return backwardMinFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct backwardMaxFrameLossRatio() {
+        return backwardMaxFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct backwardAverageFrameLossRatio() {
+        return backwardAverageFrameLossRatio;
+    }
+
+    /**
+     * Abstract base class for builders of.
+     * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}.
+     */
+    protected abstract static class DefaultLaStatBuilder implements LaStatBuilder {
+        private final Duration elapsedTime;
+        private final boolean suspectStatus;
+        private Long forwardHighLoss;
+        private Long backwardHighLoss;
+        private Long forwardConsecutiveHighLoss;
+        private Long backwardConsecutiveHighLoss;
+        private Long forwardAvailable;
+        private Long backwardAvailable;
+        private Long forwardUnavailable;
+        private Long backwardUnavailable;
+        private MilliPct forwardMinFrameLossRatio;
+        private MilliPct forwardMaxFrameLossRatio;
+        private MilliPct forwardAverageFrameLossRatio;
+        private MilliPct backwardMinFrameLossRatio;
+        private MilliPct backwardMaxFrameLossRatio;
+        private MilliPct backwardAverageFrameLossRatio;
+
+        protected DefaultLaStatBuilder(Duration elapsedTime, boolean suspectStatus) {
+            this.elapsedTime = elapsedTime;
+            this.suspectStatus = suspectStatus;
+        }
+
+        @Override
+        public LaStatBuilder forwardHighLoss(Long forwardHighLoss) {
+            this.forwardHighLoss = forwardHighLoss;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardHighLoss(Long backwardHighLoss) {
+            this.backwardHighLoss = backwardHighLoss;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardConsecutiveHighLoss(
+                Long forwardConsecutiveHighLoss) {
+            this.forwardConsecutiveHighLoss = forwardConsecutiveHighLoss;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardConsecutiveHighLoss(
+                Long backwardConsecutiveHighLoss) {
+            this.backwardConsecutiveHighLoss = backwardConsecutiveHighLoss;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardAvailable(Long forwardAvailable) {
+            this.forwardAvailable = forwardAvailable;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardAvailable(Long backwardAvailable) {
+            this.backwardAvailable = backwardAvailable;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardUnavailable(Long forwardUnavailable) {
+            this.forwardUnavailable = forwardUnavailable;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardUnavailable(Long backwardUnavailable) {
+            this.backwardUnavailable = backwardUnavailable;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardMinFrameLossRatio(
+                MilliPct forwardMinFrameLossRatio) {
+            this.forwardMinFrameLossRatio = forwardMinFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardMaxFrameLossRatio(
+                MilliPct forwardMaxFrameLossRatio) {
+            this.forwardMaxFrameLossRatio = forwardMaxFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder forwardAverageFrameLossRatio(
+                MilliPct forwardAverageFrameLossRatio) {
+            this.forwardAverageFrameLossRatio = forwardAverageFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardMinFrameLossRatio(
+                MilliPct backwardMinFrameLossRatio) {
+            this.backwardMinFrameLossRatio = backwardMinFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardMaxFrameLossRatio(
+                MilliPct backwardMaxFrameLossRatio) {
+            this.backwardMaxFrameLossRatio = backwardMaxFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LaStatBuilder backwardAverageFrameLossRatio(
+                MilliPct backwardAverageFrameLossRatio) {
+            this.backwardAverageFrameLossRatio = backwardAverageFrameLossRatio;
+            return this;
+        }
+    }
+
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatCurrent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatCurrent.java
new file mode 100644
index 0000000..9564ef0
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatCurrent.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.time.Instant;
+
+/**
+ * The default implementation of LossAvailabilityStatCurrent.
+ * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStatCurrent}.
+ */
+public final class DefaultLaStatCurrent extends DefaultLaStat
+                        implements LossAvailabilityStatCurrent {
+    private final Instant startTime;
+
+    private DefaultLaStatCurrent(DefaultLaStatCurrentBuilder builder) {
+        super(builder);
+        this.startTime = builder.startTime;
+    }
+
+    @Override
+    public Instant startTime() {
+        return startTime;
+    }
+
+    public static LaStatCurrentBuilder builder(Duration elapsedTime,
+            boolean suspectStatus, Instant startTime) {
+        return new DefaultLaStatCurrentBuilder(elapsedTime, suspectStatus,
+                startTime);
+    }
+
+    private static final class DefaultLaStatCurrentBuilder
+                extends DefaultLaStatBuilder implements LaStatCurrentBuilder {
+        private Instant startTime;
+
+        protected DefaultLaStatCurrentBuilder(Duration elapsedTime,
+                boolean suspectStatus, Instant startTime) {
+            super(elapsedTime, suspectStatus);
+            this.startTime = startTime;
+        }
+
+        @Override
+        public LossAvailabilityStatCurrent build() {
+            return new DefaultLaStatCurrent(this);
+        }
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatHistory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatHistory.java
new file mode 100644
index 0000000..6203bbd
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLaStatHistory.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.time.Instant;
+
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * The default implementation of LossAvailabilityStatHistory.
+ * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStatHistory}.
+ */
+public final class DefaultLaStatHistory extends DefaultLaStat
+                        implements LossAvailabilityStatHistory {
+    private final Instant endTime;
+    private final SoamId historyStatsId;
+
+    private DefaultLaStatHistory(DefaultLaStatHistoryBuilder builder) {
+        super(builder);
+        this.endTime = builder.endTime;
+        this.historyStatsId = builder.historyStatsId;
+    }
+
+    @Override
+    public Instant endTime() {
+        return endTime;
+    }
+
+    @Override
+    public SoamId historyStatsId() {
+        return historyStatsId;
+    }
+
+    public static LaStatHistoryBuilder builder(Duration elapsedTime,
+            boolean suspectStatus, SoamId historyStatsId, Instant endTime) {
+        return new DefaultLaStatHistoryBuilder(elapsedTime, suspectStatus,
+                historyStatsId, endTime);
+    }
+
+    private static final class DefaultLaStatHistoryBuilder
+                extends DefaultLaStatBuilder implements LaStatHistoryBuilder {
+        private Instant endTime;
+        private SoamId historyStatsId;
+
+        protected DefaultLaStatHistoryBuilder(Duration elapsedTime,
+                boolean suspectStatus, SoamId historyStatsId, Instant endTime) {
+            super(elapsedTime, suspectStatus);
+            this.historyStatsId = historyStatsId;
+            this.endTime = endTime;
+        }
+
+        @Override
+        public LossAvailabilityStatHistory build() {
+            return new DefaultLaStatHistory(this);
+        }
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmCreate.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmCreate.java
new file mode 100644
index 0000000..c735994
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmCreate.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.cfm.Mep.Priority;
+import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MepId;
+import org.onosproject.incubator.net.l2monitoring.soam.DefaultMeasurementCreateBase;
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamConfigException;
+import org.onosproject.incubator.net.l2monitoring.soam.delay.DelayMeasurementCreate.Version;
+
+/**
+ * The default implementation of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementCreate}.
+ */
+public class DefaultLmCreate extends DefaultMeasurementCreateBase
+        implements LossMeasurementCreate {
+
+    private final LmType lmCfgType;
+    private final Collection<CounterOption> countersEnabled;
+    private final Duration availabilityMeasurementInterval;
+    private final Integer availabilityNumberConsecutiveFlrMeasurements;
+    private final MilliPct availabilityFlrThreshold;
+    private final Short availabilityNumberConsecutiveIntervals;
+    private final Short availabilityNumberConsecutiveHighFlr;
+    private final Collection<LossMeasurementThreshold> lossMeasurementThresholds;
+
+    protected DefaultLmCreate(DefaultLmCreateBuilder builder) {
+        super(builder);
+        this.lmCfgType = builder.lmCfgType;
+        this.countersEnabled = builder.countersEnabled;
+        this.availabilityMeasurementInterval = builder.availabilityMeasurementInterval;
+        this.availabilityNumberConsecutiveFlrMeasurements = builder.availabilityNumberConsecutiveFlrMeasurements;
+        this.availabilityFlrThreshold = builder.availabilityFlrThreshold;
+        this.availabilityNumberConsecutiveIntervals = builder.availabilityNumberConsecutiveIntervals;
+        this.availabilityNumberConsecutiveHighFlr = builder.availabilityNumberConsecutiveHighFlr;
+        this.lossMeasurementThresholds = builder.lossMeasurementThresholds;
+    }
+
+    @Override
+    public LmType lmCfgType() {
+        return this.lmCfgType;
+    }
+
+    @Override
+    public Collection<CounterOption> countersEnabled() {
+        return this.countersEnabled;
+    }
+
+    @Override
+    public Duration availabilityMeasurementInterval() {
+        return this.availabilityMeasurementInterval;
+    }
+
+    @Override
+    public Integer availabilityNumberConsecutiveFlrMeasurements() {
+        return this.availabilityNumberConsecutiveFlrMeasurements;
+    }
+
+    @Override
+    public MilliPct availabilityFlrThreshold() {
+        return this.availabilityFlrThreshold;
+    }
+
+    @Override
+    public Short availabilityNumberConsecutiveIntervals() {
+        return this.availabilityNumberConsecutiveIntervals;
+    }
+
+    @Override
+    public Short availabilityNumberConsecutiveHighFlr() {
+        return this.availabilityNumberConsecutiveHighFlr;
+    }
+
+    @Override
+    public Collection<LossMeasurementThreshold> lossMeasurementThreshold() {
+        return this.lossMeasurementThresholds;
+    }
+
+    public static LmCreateBuilder builder(Version version, MepId remoteMepId,
+            Priority priority, LmType lmCfgType) throws SoamConfigException {
+        return new DefaultLmCreateBuilder(version, remoteMepId,
+                priority, lmCfgType);
+    }
+
+    /**
+     * Implementation of LmCreateBuilder.
+     * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementCreate.LmCreateBuilder}
+     */
+    protected static class DefaultLmCreateBuilder extends DefaultMeasCreateBaseBuilder
+            implements LmCreateBuilder {
+        private final LmType lmCfgType;
+        private Collection<CounterOption> countersEnabled;
+        private Duration availabilityMeasurementInterval;
+        private Integer availabilityNumberConsecutiveFlrMeasurements;
+        private MilliPct availabilityFlrThreshold;
+        private Short availabilityNumberConsecutiveIntervals;
+        private Short availabilityNumberConsecutiveHighFlr;
+        private Collection<LossMeasurementThreshold> lossMeasurementThresholds;
+
+        protected DefaultLmCreateBuilder(Version version, MepId remoteMepId,
+                Priority priority, LmType lmCfgType) throws SoamConfigException {
+            super(version, remoteMepId, priority);
+            this.lmCfgType = lmCfgType;
+            countersEnabled = new ArrayList<>();
+            lossMeasurementThresholds = new ArrayList<>();
+        }
+
+        @Override
+        public LmCreateBuilder addToCountersEnabled(
+                CounterOption counterOption) {
+            this.countersEnabled.add(counterOption);
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder availabilityMeasurementInterval(
+                Duration availabilityMeasurementInterval) {
+            this.availabilityMeasurementInterval = availabilityMeasurementInterval;
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder availabilityNumberConsecutiveFlrMeasurements(
+                Integer availabilityNumberConsecutiveFlrMeasurements) {
+            this.availabilityNumberConsecutiveFlrMeasurements =
+                    availabilityNumberConsecutiveFlrMeasurements;
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder availabilityFlrThreshold(
+                MilliPct availabilityFlrThreshold) {
+            this.availabilityFlrThreshold = availabilityFlrThreshold;
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder availabilityNumberConsecutiveIntervals(
+                Short availabilityNumberConsecutiveIntervals)
+                throws SoamConfigException {
+            this.availabilityNumberConsecutiveIntervals = availabilityNumberConsecutiveIntervals;
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder availabilityNumberConsecutiveHighFlr(
+                Short availabilityNumberConsecutiveHighFlr)
+                throws SoamConfigException {
+            this.availabilityNumberConsecutiveHighFlr = availabilityNumberConsecutiveHighFlr;
+            return this;
+        }
+
+        @Override
+        public LmCreateBuilder addToLossMeasurementThreshold(
+                LossMeasurementThreshold lossMeasurementThreshold) {
+            this.lossMeasurementThresholds.add(lossMeasurementThreshold);
+            return this;
+        }
+
+        @Override
+        public LossMeasurementCreate build() {
+            return new DefaultLmCreate(this);
+        }
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmEntry.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmEntry.java
new file mode 100644
index 0000000..3e45303
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmEntry.java
@@ -0,0 +1,220 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.cfm.Mep.Priority;
+import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MepId;
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamConfigException;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+import org.onosproject.incubator.net.l2monitoring.soam.delay.DelayMeasurementCreate.Version;
+
+/**
+ * The default implementation of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementEntry}.
+ */
+public final class DefaultLmEntry extends DefaultLmCreate
+        implements LossMeasurementEntry {
+    private final SoamId lmId;
+    private final MilliPct measuredForwardFlr;
+    private final MilliPct measuredBackwardFlr;
+    private final AvailabilityType measuredAvailabilityForwardStatus;
+    private final AvailabilityType measuredAvailabilityBackwardStatus;
+    private final Instant measuredForwardLastTransitionTime;
+    private final Instant measuredBackwardLastTransitionTime;
+    private final LossMeasurementStatCurrent measurementCurrent;
+    private final Collection<LossMeasurementStatHistory> measurementHistories;
+    private final LossAvailabilityStatCurrent availabilityCurrent;
+    private final Collection<LossAvailabilityStatHistory> availabilityHistories;
+
+    protected DefaultLmEntry(DefaultLmEntryBuilder builder) {
+        super(builder);
+        this.lmId = builder.lmId;
+        this.measuredForwardFlr = builder.measuredForwardFlr;
+        this.measuredBackwardFlr = builder.measuredBackwardFlr;
+        this.measuredAvailabilityForwardStatus = builder.measuredAvailabilityForwardStatus;
+        this.measuredAvailabilityBackwardStatus = builder.measuredAvailabilityBackwardStatus;
+        this.measuredForwardLastTransitionTime = builder.measuredForwardLastTransitionTime;
+        this.measuredBackwardLastTransitionTime = builder.measuredBackwardLastTransitionTime;
+        this.measurementCurrent = builder.measurementCurrent;
+        this.measurementHistories = builder.measurementHistories;
+        this.availabilityCurrent = builder.availabilityCurrent;
+        this.availabilityHistories = builder.availabilityHistories;
+    }
+
+    @Override
+    public SoamId lmId() {
+        return lmId;
+    }
+
+    @Override
+    public MilliPct measuredForwardFlr() {
+        return measuredForwardFlr;
+    }
+
+    @Override
+    public MilliPct measuredBackwardFlr() {
+        return measuredBackwardFlr;
+    }
+
+    @Override
+    public AvailabilityType measuredAvailabilityForwardStatus() {
+        return measuredAvailabilityForwardStatus;
+    }
+
+    @Override
+    public AvailabilityType measuredAvailabilityBackwardStatus() {
+        return measuredAvailabilityBackwardStatus;
+    }
+
+    @Override
+    public Instant measuredForwardLastTransitionTime() {
+        return measuredForwardLastTransitionTime;
+    }
+
+    @Override
+    public Instant measuredBackwardLastTransitionTime() {
+        return measuredBackwardLastTransitionTime;
+    }
+
+    @Override
+    public LossMeasurementStatCurrent measurementCurrent() {
+        return measurementCurrent;
+    }
+
+    @Override
+    public Collection<LossMeasurementStatHistory> measurementHistories() {
+        return measurementHistories;
+    }
+
+    @Override
+    public LossAvailabilityStatCurrent availabilityCurrent() {
+        return availabilityCurrent;
+    }
+
+    @Override
+    public Collection<LossAvailabilityStatHistory> availabilityHistories() {
+        return availabilityHistories;
+    }
+
+    public static LmEntryBuilder builder(Version version, MepId remoteMepId,
+            Priority priority, LmType lmCfgType, SoamId lmId)
+                    throws SoamConfigException {
+        return new DefaultLmEntryBuilder(version, remoteMepId,
+                priority, lmCfgType, lmId);
+    }
+
+    private static final class DefaultLmEntryBuilder extends DefaultLmCreateBuilder
+                    implements LmEntryBuilder {
+        private final SoamId lmId;
+        private MilliPct measuredForwardFlr;
+        private MilliPct measuredBackwardFlr;
+        private AvailabilityType measuredAvailabilityForwardStatus;
+        private AvailabilityType measuredAvailabilityBackwardStatus;
+        private Instant measuredForwardLastTransitionTime;
+        private Instant measuredBackwardLastTransitionTime;
+        private LossMeasurementStatCurrent measurementCurrent;
+        private Collection<LossMeasurementStatHistory> measurementHistories;
+        private LossAvailabilityStatCurrent availabilityCurrent;
+        private Collection<LossAvailabilityStatHistory> availabilityHistories;
+
+        protected DefaultLmEntryBuilder(Version version, MepId remoteMepId,
+                Priority priority, LmType lmCfgType, SoamId lmId)
+                throws SoamConfigException {
+            super(version, remoteMepId, priority, lmCfgType);
+            this.lmId = lmId;
+            measurementHistories = new ArrayList<>();
+            availabilityHistories = new ArrayList<>();
+        }
+
+        @Override
+        public LmEntryBuilder measuredForwardFlr(MilliPct measuredForwardFlr) {
+            this.measuredForwardFlr = measuredForwardFlr;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measuredBackwardFlr(
+                MilliPct measuredBackwardFlr) {
+            this.measuredBackwardFlr = measuredBackwardFlr;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measuredAvailabilityForwardStatus(
+                AvailabilityType measuredAvailabilityForwardStatus) {
+            this.measuredAvailabilityForwardStatus = measuredAvailabilityForwardStatus;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measuredAvailabilityBackwardStatus(
+                AvailabilityType measuredAvailabilityBackwardStatus) {
+            this.measuredAvailabilityBackwardStatus = measuredAvailabilityBackwardStatus;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measuredForwardLastTransitionTime(
+                Instant measuredForwardLastTransitionTime) {
+            this.measuredForwardLastTransitionTime = measuredForwardLastTransitionTime;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measuredBackwardLastTransitionTime(
+                Instant measuredBackwardLastTransitionTime) {
+            this.measuredBackwardLastTransitionTime = measuredBackwardLastTransitionTime;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder measurementCurrent(
+                LossMeasurementStatCurrent measurementCurrent) {
+            this.measurementCurrent = measurementCurrent;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder addToMeasurementHistories(
+                LossMeasurementStatHistory history) {
+            this.measurementHistories.add(history);
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder availabilityCurrent(
+                LossAvailabilityStatCurrent availabilityCurrent) {
+            this.availabilityCurrent = availabilityCurrent;
+            return this;
+        }
+
+        @Override
+        public LmEntryBuilder addToAvailabilityHistories(
+                LossAvailabilityStatHistory history) {
+            this.availabilityHistories.add(history);
+            return this;
+        }
+
+        @Override
+        public LossMeasurementEntry build() {
+            return new DefaultLmEntry(this);
+        }
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStat.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStat.java
new file mode 100644
index 0000000..0410e47
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStat.java
@@ -0,0 +1,235 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+
+/**
+ * The default implementation of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStat}.
+ */
+public abstract class DefaultLmStat implements LossMeasurementStat {
+    private final Duration elapsedTime;
+    private final boolean suspectStatus;
+    private final Long forwardTransmittedFrames;
+    private final Long forwardReceivedFrames;
+    private final MilliPct forwardMinFrameLossRatio;
+    private final MilliPct forwardMaxFrameLossRatio;
+    private final MilliPct forwardAverageFrameLossRatio;
+    private final Long backwardTransmittedFrames;
+    private final Long backwardReceivedFrames;
+    private final MilliPct backwardMinFrameLossRatio;
+    private final MilliPct backwardMaxFrameLossRatio;
+    private final MilliPct backwardAverageFrameLossRatio;
+    private final Long soamPdusSent;
+    private final Long soamPdusReceived;
+
+    protected DefaultLmStat(DefaultLmStatBuilder builder) {
+        this.elapsedTime = builder.elapsedTime;
+        this.suspectStatus = builder.suspectStatus;
+        this.forwardTransmittedFrames = builder.forwardTransmittedFrames;
+        this.forwardReceivedFrames = builder.forwardReceivedFrames;
+        this.forwardMinFrameLossRatio = builder.forwardMinFrameLossRatio;
+        this.forwardMaxFrameLossRatio = builder.forwardMaxFrameLossRatio;
+        this.forwardAverageFrameLossRatio = builder.forwardAverageFrameLossRatio;
+        this.backwardTransmittedFrames = builder.backwardTransmittedFrames;
+        this.backwardReceivedFrames = builder.backwardReceivedFrames;
+        this.backwardMinFrameLossRatio = builder.backwardMinFrameLossRatio;
+        this.backwardMaxFrameLossRatio = builder.backwardMaxFrameLossRatio;
+        this.backwardAverageFrameLossRatio = builder.backwardAverageFrameLossRatio;
+        this.soamPdusSent = builder.soamPdusSent;
+        this.soamPdusReceived = builder.soamPdusReceived;
+    }
+
+    @Override
+    public Duration elapsedTime() {
+        return this.elapsedTime;
+    }
+
+    @Override
+    public boolean suspectStatus() {
+        return this.suspectStatus;
+    }
+
+    @Override
+    public Long forwardTransmittedFrames() {
+        return this.forwardTransmittedFrames;
+    }
+
+    @Override
+    public Long forwardReceivedFrames() {
+        return this.forwardReceivedFrames;
+    }
+
+    @Override
+    public MilliPct forwardMinFrameLossRatio() {
+        return this.forwardMinFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct forwardMaxFrameLossRatio() {
+        return this.forwardMaxFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct forwardAverageFrameLossRatio() {
+        return this.forwardAverageFrameLossRatio;
+    }
+
+    @Override
+    public Long backwardTransmittedFrames() {
+        return this.backwardTransmittedFrames;
+    }
+
+    @Override
+    public Long backwardReceivedFrames() {
+        return this.backwardReceivedFrames;
+    }
+
+    @Override
+    public MilliPct backwardMinFrameLossRatio() {
+        return this.backwardMinFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct backwardMaxFrameLossRatio() {
+        return this.backwardMaxFrameLossRatio;
+    }
+
+    @Override
+    public MilliPct backwardAverageFrameLossRatio() {
+        return this.backwardAverageFrameLossRatio;
+    }
+
+    @Override
+    public Long soamPdusSent() {
+        return this.soamPdusSent;
+    }
+
+    @Override
+    public Long soamPdusReceived() {
+        return this.soamPdusReceived;
+    }
+
+    /**
+     * Abstract implementation of LmStatBuilder.
+     * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStat.LmStatBuilder}
+     */
+    protected abstract static class DefaultLmStatBuilder implements LmStatBuilder {
+        private final Duration elapsedTime;
+        private final boolean suspectStatus;
+        private Long forwardTransmittedFrames;
+        private Long forwardReceivedFrames;
+        private MilliPct forwardMinFrameLossRatio;
+        private MilliPct forwardMaxFrameLossRatio;
+        private MilliPct forwardAverageFrameLossRatio;
+        private Long backwardTransmittedFrames;
+        private Long backwardReceivedFrames;
+        private MilliPct backwardMinFrameLossRatio;
+        private MilliPct backwardMaxFrameLossRatio;
+        private MilliPct backwardAverageFrameLossRatio;
+        private Long soamPdusSent;
+        private Long soamPdusReceived;
+
+        protected DefaultLmStatBuilder(Duration elapsedTime, boolean suspectStatus) {
+            this.elapsedTime = elapsedTime;
+            this.suspectStatus = suspectStatus;
+        }
+
+        @Override
+        public LmStatBuilder forwardTransmittedFrames(
+                Long forwardTransmittedFrames) {
+            this.forwardTransmittedFrames = forwardTransmittedFrames;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder forwardReceivedFrames(Long forwardReceivedFrames) {
+            this.forwardReceivedFrames = forwardReceivedFrames;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder forwardMinFrameLossRatio(
+                MilliPct forwardMinFrameLossRatio) {
+            this.forwardMinFrameLossRatio = forwardMinFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder forwardMaxFrameLossRatio(
+                MilliPct forwardMaxFrameLossRatio) {
+            this.forwardMaxFrameLossRatio = forwardMaxFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder forwardAverageFrameLossRatio(
+                MilliPct forwardAverageFrameLossRatio) {
+            this.forwardAverageFrameLossRatio = forwardAverageFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder backwardTransmittedFrames(
+                Long backwardTransmittedFrames) {
+            this.backwardTransmittedFrames = backwardTransmittedFrames;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder backwardReceivedFrames(
+                Long backwardReceivedFrames) {
+            this.backwardReceivedFrames = backwardReceivedFrames;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder backwardMinFrameLossRatio(
+                MilliPct backwardMinFrameLossRatio) {
+            this.backwardMinFrameLossRatio = backwardMinFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder backwardMaxFrameLossRatio(
+                MilliPct backwardMaxFrameLossRatio) {
+            this.backwardMaxFrameLossRatio = backwardMaxFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder backwardAverageFrameLossRatio(
+                MilliPct backwardAverageFrameLossRatio) {
+            this.backwardAverageFrameLossRatio = backwardAverageFrameLossRatio;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder soamPdusSent(Long soamPdusSent) {
+            this.soamPdusSent = soamPdusSent;
+            return this;
+        }
+
+        @Override
+        public LmStatBuilder soamPdusReceived(Long soamPdusReceived) {
+            this.soamPdusReceived = soamPdusReceived;
+            return this;
+        }
+    }
+
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatCurrent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatCurrent.java
new file mode 100644
index 0000000..1920845
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatCurrent.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.time.Instant;
+
+/**
+ * The default implementation of LossMeasurementStatCurrent.
+ * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatCurrent}
+ */
+public final class DefaultLmStatCurrent extends DefaultLmStat
+        implements LossMeasurementStatCurrent {
+    private final Instant startTime;
+
+    protected DefaultLmStatCurrent(DefaultLmStatCurrentBuilder builder) {
+        super(builder);
+        this.startTime = builder.startTime;
+    }
+
+    @Override
+    public Instant startTime() {
+        return startTime;
+    }
+
+    public static LmStatCurrentBuilder builder(Duration elapsedTime,
+            boolean suspectStatus, Instant startTime) {
+        return new DefaultLmStatCurrentBuilder(elapsedTime,
+                suspectStatus, startTime);
+    }
+
+    private static class DefaultLmStatCurrentBuilder extends DefaultLmStatBuilder
+            implements LmStatCurrentBuilder {
+        private final Instant startTime;
+
+        protected DefaultLmStatCurrentBuilder(Duration elapsedTime,
+                boolean suspectStatus, Instant startTime) {
+            super(elapsedTime, suspectStatus);
+            this.startTime = startTime;
+        }
+
+        @Override
+        public LossMeasurementStatCurrent build() {
+            return new DefaultLmStatCurrent(this);
+        }
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatHistory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatHistory.java
new file mode 100644
index 0000000..1109e92
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmStatHistory.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.time.Instant;
+
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * The default implementation of LossMeasurementStatHistory.
+ * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatHistory}
+ */
+public final class DefaultLmStatHistory extends DefaultLmStat
+        implements LossMeasurementStatHistory {
+    private final SoamId historyStatsId;
+    private final Instant endTime;
+
+    protected DefaultLmStatHistory(DefaultLmStatHistoryBuilder builder) {
+        super(builder);
+        this.historyStatsId = builder.historyStatsId;
+        this.endTime = builder.endTime;
+    }
+
+    @Override
+    public SoamId historyStatsId() {
+        return historyStatsId;
+    }
+
+
+    @Override
+    public Instant endTime() {
+        return endTime;
+    }
+
+    public static LmStatHistoryBuilder builder(Duration elapsedTime,
+            boolean suspectStatus, SoamId historyStatsId, Instant endTime) {
+        return new DefaultLmStatHistoryBuilder(elapsedTime,
+                suspectStatus, historyStatsId, endTime);
+    }
+
+    private static class DefaultLmStatHistoryBuilder extends DefaultLmStatBuilder
+            implements LmStatHistoryBuilder {
+        private final SoamId historyStatsId;
+        private final Instant endTime;
+
+        protected DefaultLmStatHistoryBuilder(Duration elapsedTime,
+                boolean suspectStatus, SoamId historyStatsId, Instant endTime) {
+            super(elapsedTime, suspectStatus);
+            this.historyStatsId = historyStatsId;
+            this.endTime = endTime;
+        }
+
+        @Override
+        public LossMeasurementStatHistory build() {
+            return new DefaultLmStatHistory(this);
+        }
+    }
+
+
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmThreshold.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmThreshold.java
new file mode 100644
index 0000000..0487516
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/DefaultLmThreshold.java
@@ -0,0 +1,274 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * The default implementation of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementThreshold}.
+ */
+public final class DefaultLmThreshold implements LossMeasurementThreshold {
+
+    private final SoamId thresholdId;
+    private final Collection<ThresholdOption> threshold;
+    private final MilliPct measuredFlrForward;
+    private final MilliPct maxFlrForward;
+    private final MilliPct averageFlrForward;
+    private final MilliPct measuredFlrBackward;
+    private final MilliPct maxFlrBackward;
+    private final MilliPct averageFlrBackward;
+    private final Long forwardHighLoss;
+    private final Long forwardConsecutiveHighLoss;
+    private final Long backwardHighLoss;
+    private final Long backwardConsecutiveHighLoss;
+    private final Long forwardUnavailableCount;
+    private final MilliPct forwardAvailableRatio;
+    private final Long backwardUnavailableCount;
+    private final MilliPct backwardAvailableRatio;
+
+    private DefaultLmThreshold(DefaultLmThresholdBuilder builder) {
+        this.thresholdId = builder.thresholdId;
+        this.threshold = builder.threshold;
+        this.measuredFlrForward = builder.measuredFlrForward;
+        this.maxFlrForward = builder.maxFlrForward;
+        this.averageFlrForward = builder.averageFlrForward;
+        this.measuredFlrBackward = builder.measuredFlrBackward;
+        this.maxFlrBackward = builder.maxFlrBackward;
+        this.averageFlrBackward = builder.averageFlrBackward;
+        this.forwardHighLoss = builder.forwardHighLoss;
+        this.forwardConsecutiveHighLoss = builder.forwardConsecutiveHighLoss;
+        this.backwardHighLoss = builder.backwardHighLoss;
+        this.backwardConsecutiveHighLoss = builder.backwardConsecutiveHighLoss;
+        this.forwardUnavailableCount = builder.forwardUnavailableCount;
+        this.forwardAvailableRatio = builder.forwardAvailableRatio;
+        this.backwardUnavailableCount = builder.backwardUnavailableCount;
+        this.backwardAvailableRatio = builder.backwardAvailableRatio;
+    }
+
+    @Override
+    public SoamId thresholdId() {
+        return thresholdId;
+    }
+
+    @Override
+    public Collection<ThresholdOption> thresholds() {
+        return threshold;
+    }
+
+    @Override
+    public MilliPct measuredFlrForward() {
+        return measuredFlrForward;
+    }
+
+    @Override
+    public MilliPct maxFlrForward() {
+        return maxFlrForward;
+    }
+
+    @Override
+    public MilliPct averageFlrForward() {
+        return averageFlrForward;
+    }
+
+    @Override
+    public MilliPct measuredFlrBackward() {
+        return measuredFlrBackward;
+    }
+
+    @Override
+    public MilliPct maxFlrBackward() {
+        return maxFlrBackward;
+    }
+
+    @Override
+    public MilliPct averageFlrBackward() {
+        return averageFlrBackward;
+    }
+
+    @Override
+    public Long forwardHighLoss() {
+        return forwardHighLoss;
+    }
+
+    @Override
+    public Long forwardConsecutiveHighLoss() {
+        return forwardConsecutiveHighLoss;
+    }
+
+    @Override
+    public Long backwardHighLoss() {
+        return backwardHighLoss;
+    }
+
+    @Override
+    public Long backwardConsecutiveHighLoss() {
+        return backwardConsecutiveHighLoss;
+    }
+
+    @Override
+    public Long forwardUnavailableCount() {
+        return forwardUnavailableCount;
+    }
+
+    @Override
+    public MilliPct forwardAvailableRatio() {
+        return forwardAvailableRatio;
+    }
+
+    @Override
+    public Long backwardUnavailableCount() {
+        return backwardUnavailableCount;
+    }
+
+    @Override
+    public MilliPct backwardAvailableRatio() {
+        return backwardAvailableRatio;
+    }
+
+    public static LmThresholdBuilder builder(SoamId thresholdId) {
+        return new DefaultLmThresholdBuilder(thresholdId);
+    }
+
+    private static final class DefaultLmThresholdBuilder implements LmThresholdBuilder {
+        private final SoamId thresholdId;
+        private Collection<ThresholdOption> threshold;
+        private MilliPct measuredFlrForward;
+        private MilliPct maxFlrForward;
+        private MilliPct averageFlrForward;
+        private MilliPct measuredFlrBackward;
+        private MilliPct maxFlrBackward;
+        private MilliPct averageFlrBackward;
+        private Long forwardHighLoss;
+        private Long forwardConsecutiveHighLoss;
+        private Long backwardHighLoss;
+        private Long backwardConsecutiveHighLoss;
+        private Long forwardUnavailableCount;
+        private MilliPct forwardAvailableRatio;
+        private Long backwardUnavailableCount;
+        private MilliPct backwardAvailableRatio;
+
+        protected DefaultLmThresholdBuilder(SoamId thresholdId) {
+            this.thresholdId = thresholdId;
+            threshold = new ArrayList<>();
+        }
+
+        @Override
+        public LmThresholdBuilder addToThreshold(ThresholdOption threshold) {
+            this.threshold.add(threshold);
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder measuredFlrForward(MilliPct measuredFlrForward) {
+            this.measuredFlrForward = measuredFlrForward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder maxFlrForward(MilliPct maxFlrForward) {
+            this.maxFlrForward = maxFlrForward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder averageFlrForward(MilliPct averageFlrForward) {
+            this.averageFlrForward = averageFlrForward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder measuredFlrBackward(
+                MilliPct measuredFlrBackward) {
+            this.measuredFlrBackward = measuredFlrBackward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder maxFlrBackward(MilliPct maxFlrBackward) {
+            this.maxFlrBackward = maxFlrBackward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder averageFlrBackward(MilliPct averageFlrBackward) {
+            this.averageFlrBackward = averageFlrBackward;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder forwardHighLoss(Long forwardHighLoss) {
+            this.forwardHighLoss = forwardHighLoss;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder forwardConsecutiveHighLoss(
+                Long forwardConsecutiveHighLoss) {
+            this.forwardConsecutiveHighLoss = forwardConsecutiveHighLoss;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder backwardHighLoss(Long backwardHighLoss) {
+            this.backwardHighLoss = backwardHighLoss;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder backwardConsecutiveHighLoss(
+                Long backwardConsecutiveHighLoss) {
+            this.backwardConsecutiveHighLoss = backwardConsecutiveHighLoss;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder forwardUnavailableCount(
+                Long forwardUnavailableCount) {
+            this.forwardUnavailableCount = forwardUnavailableCount;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder forwardAvailableRatio(
+                MilliPct forwardAvailableRatio) {
+            this.forwardAvailableRatio = forwardAvailableRatio;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder backwardUnavailableCount(
+                Long backwardUnavailableCount) {
+            this.backwardUnavailableCount = backwardUnavailableCount;
+            return this;
+        }
+
+        @Override
+        public LmThresholdBuilder backwardAvailableRatio(
+                MilliPct backwardAvailableRatio) {
+            this.backwardAvailableRatio = backwardAvailableRatio;
+            return this;
+        }
+
+        @Override
+        public LossMeasurementThreshold build() {
+            return new DefaultLmThreshold(this);
+        }
+    }
+}
\ No newline at end of file
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStat.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStat.java
new file mode 100644
index 0000000..09b6e0e
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStat.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+
+/**
+ * Abstract base interface to represent Loss Availability Stats.
+ */
+public interface LossAvailabilityStat {
+
+    Duration elapsedTime();
+
+    /**
+     * Indicates whether the Measurement Interval has been marked as suspect.
+     * The object is set to false at the start of a measurement interval.
+     * Conditions for a discontinuity include, but are not limited to the following:
+     * 1 - The local time-of-day clock is adjusted by at least 10 seconds
+     * 2 - The conducting of a performance measurement is halted before the
+     *  current Measurement Interval is completed
+     *  3 - A local test, failure, or reconfiguration that disrupts service
+     * @return true when there is a discontinuity in the performance measurements during the Measurement Interval
+     */
+    boolean suspectStatus();
+
+    /**
+     * The number of high loss intervals (HLI) over time in the forward direction.
+     * The value starts at 0 and increments for every HLI that occurs.
+     * This parameter is equivalent to 'L Sub T' found in MEF 10.2.1
+     * @return the number of intervals
+     */
+    Long forwardHighLoss();
+
+    /**
+     * The number of high loss intervals (HLI) over time in the backward direction.
+     * The value starts at 0 and increments for every HLI that occurs.
+     * This parameter is equivalent to 'L Sub T' found in MEF 10.2.1
+     * @return the number of intervals
+     */
+    Long backwardHighLoss();
+
+    /**
+     * The number of consecutive high loss intervals (CHLI) over time in the forward direction.
+     * The value starts at 0 and increments for every HLI that occurs.
+     * This parameter is equivalent to 'B Sub T' found in MEF 10.2.1
+     * @return the number of intervals
+     */
+    Long forwardConsecutiveHighLoss();
+
+    /**
+     * The number of consecutive high loss intervals (CHLI) over time in the backward direction.
+     * The value starts at 0 and increments for every HLI that occurs.
+     * This parameter is equivalent to 'B Sub T' found in MEF 10.2.1
+     * @return the number of intervals
+     */
+    Long backwardConsecutiveHighLoss();
+
+    /**
+     * The number of availability indicators during a small time interval.
+     * evaluated as available (low frame loss) in the forward direction by this
+     * MEP during this measurement interval.
+     * @return The number of availability indicators
+     */
+    Long forwardAvailable();
+
+    /**
+     * The number of availability indicators during a small time interval.
+     * evaluated as available (low frame loss) in the backward direction by
+     * this MEP during this measurement interval.
+     * @return The number of availability indicators
+     */
+    Long backwardAvailable();
+
+    /**
+     * The number of availability indicators during a small time interval.
+     * evaluated as unavailable (high frame loss) in the forward direction by
+     * this MEP during this measurement interval
+     * @return The number of availability indicators
+     */
+    Long forwardUnavailable();
+
+    /**
+     * The number of availability indicators during a small time interval.
+     * evaluated as unavailable (high frame loss) in the backward direction by
+     * this MEP during this measurement interval
+     * @return The number of availability indicators
+     */
+    Long backwardUnavailable();
+
+    /**
+     * The minimum one-way availability flr in the forward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardMinFrameLossRatio();
+
+    /**
+     * The maximum one-way availability flr in the forward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardMaxFrameLossRatio();
+
+    /**
+     * The average one-way availability flr in the forward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardAverageFrameLossRatio();
+
+    /**
+     * The minimum one-way availability flr in the backward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardMinFrameLossRatio();
+
+    /**
+     * The maximum one-way availability flr in the backward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardMaxFrameLossRatio();
+
+    /**
+     * The average one-way availability flr in the backward direction,.
+     * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
+     * There is one availability flr value for each 'delta_t' time period within
+     * the Measurement Interval, as specified in MEF 10.2.1.
+     * The flr value is a ratio that is expressed as a percent with a value of 0
+     * (ratio 0.00) through 100000 (ratio 1.00).
+     * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardAverageFrameLossRatio();
+
+    /**
+     * Abstract builder for classes derived from LossAvailabilityStat.
+     * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}.
+     */
+    public interface LaStatBuilder {
+        LaStatBuilder forwardHighLoss(Long forwardHighLoss);
+
+        LaStatBuilder backwardHighLoss(Long backwardHighLoss);
+
+        LaStatBuilder forwardConsecutiveHighLoss(Long forwardConsecutiveHighLoss);
+
+        LaStatBuilder backwardConsecutiveHighLoss(Long backwardConsecutiveHighLoss);
+
+        LaStatBuilder forwardAvailable(Long forwardAvailable);
+
+        LaStatBuilder backwardAvailable(Long backwardAvailable);
+
+        LaStatBuilder forwardUnavailable(Long forwardUnavailable);
+
+        LaStatBuilder backwardUnavailable(Long backwardUnavailable);
+
+        LaStatBuilder forwardMinFrameLossRatio(MilliPct forwardMinFrameLossRatio);
+
+        LaStatBuilder forwardMaxFrameLossRatio(MilliPct forwardMaxFrameLossRatio);
+
+        LaStatBuilder forwardAverageFrameLossRatio(MilliPct forwardAverageFrameLossRatio);
+
+        LaStatBuilder backwardMinFrameLossRatio(MilliPct backwardMinFrameLossRatio);
+
+        LaStatBuilder backwardMaxFrameLossRatio(MilliPct backwardMaxFrameLossRatio);
+
+        LaStatBuilder backwardAverageFrameLossRatio(MilliPct backwardAverageFrameLossRatio);
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatCurrent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatCurrent.java
new file mode 100644
index 0000000..9c1465a
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatCurrent.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+
+/**
+ * Object for representing Loss Availability Stats Current.
+ * Extends {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}
+ */
+public interface LossAvailabilityStatCurrent extends LossAvailabilityStat {
+    /**
+     * The time that the current Measurement Interval started.
+     * @return The start time as a java Instant
+     */
+    Instant startTime();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStatCurrent}.
+     */
+    public interface LaStatCurrentBuilder extends LaStatBuilder {
+        LossAvailabilityStatCurrent build();
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatHistory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatHistory.java
new file mode 100644
index 0000000..49beef5
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossAvailabilityStatHistory.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * Object for representing Loss Availability Stats History.
+ * Extends {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}
+ */
+public interface LossAvailabilityStatHistory extends LossAvailabilityStat {
+    /**
+     * The identifier of the historic measurement.
+     * @return The id
+     */
+    SoamId historyStatsId();
+
+    /**
+     * The time that the historic Measurement Interval ended.
+     * @return A java Instant
+     */
+    Instant endTime();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStatHistory}.
+     */
+    public interface LaStatHistoryBuilder extends LaStatBuilder {
+        LossAvailabilityStatHistory build();
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementCreate.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementCreate.java
new file mode 100644
index 0000000..6dcb3bb
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementCreate.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MeasurementCreateBase;
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamConfigException;
+
+/**
+ * Object to support creation of Loss Measurement tests.
+ */
+public interface LossMeasurementCreate extends MeasurementCreateBase {
+    /**
+     * The type of Loss Measurement that will be performed.
+     * @return A loss Measurement type
+     */
+    LmType lmCfgType();
+
+    /**
+     * A vector of bits that indicates the type of SOAM LM counters found.
+     * in the current-stats and history-stats that are enabled.
+     * A present bit enables the specific SOAM LM counter. A not present bit disables the SOAM LM counter.
+     * If a particular SOAM LM counter is not supported the BIT value is not present.
+     * Not all SOAM LM counters are supported for all SOAM LM types.
+     * @return A collection of bit options
+     */
+    Collection<CounterOption> countersEnabled();
+
+    /**
+     * This object specifies the availability measurement interval in minutes.
+     * A measurement interval of 15 minutes is to be supported, other intervals can be supported
+     * @return A java Duration
+     */
+    Duration availabilityMeasurementInterval();
+
+    /**
+     * Specifies a configurable number of consecutive loss measurement PDUs.
+     * to be used in evaluating the availability/unavailability status of each
+     * availability indicator per MEF 10.2.1.
+     * Loss Measurement PDUs (LMMs, CCMs or SLMs) are sent regularly with a
+     * period defined by message-period.  Therefore, this object, when multiplied
+     * by message-period, is equivalent to the Availability parameter of 'delta_t'
+     * as specified by MEF 10.2.1.
+     *
+     * If the measurement-type is lmm or ccm, this object defines the number of
+     * LMM or CCM PDUs transmitted during each 'delta_t' period.  The Availability
+     * flr for a given 'delta_t' can be calculated based on the counters in the
+     * last LMM/R or CCM during this 'delta_t' and the last LMM/R or CCM in the
+     * previous 'delta_t'.
+     *
+     * If the measurement-type is slm, this object defines the number of SLM PDUs
+     * transmitted during each 'delta_t' period.  The Availability flr for a
+     * given 'delta_t' is calculated based on the number of those SLM PDUs that are lost.
+     *
+     * If the measurement-type is lmm or ccm, the number range of 1 through 10
+     * must be supported. The number range of 10 through 1000000 may be supported,
+     * but is not mandatory.
+     *
+     * If the measurement-type is slm, the number range of 10 through 100 must be
+     * supported. The number range of 100 through 1000000 may be supported,
+     * but is not mandatory
+     * @return number of consecutive loss measurement PDUs
+     */
+    Integer availabilityNumberConsecutiveFlrMeasurements();
+
+    /**
+     * Specifies a configurable availability threshold to be used in evaluating
+     * the availability/unavailability status of an availability indicator per
+     * MEF 10.2.1. The availability threshold range of 0.00 (0) through 1.00 (100000)
+     * is supported. This parameter is equivalent to the Availability parameter
+     * of 'C' as specified by MEF 10.2.1.
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct availabilityFlrThreshold();
+
+    /**
+     * Specifies a configurable number of consecutive availability indicators to
+     * be used to determine a change in the availability status as indicated by
+     * MEF 10.2.1. This parameter is equivalent to the Availability parameter of
+     * 'n' as specified by MEF 10.2.1.
+     * The number range of 1 through 10 must be supported.
+     * The number range of 1 through 1000 may be supported, but is not mandatory
+     * @return number of consecutive availability indicators
+     */
+    Short availabilityNumberConsecutiveIntervals();
+
+    /**
+     * Specifies a configurable number of consecutive availability indicators.
+     * to be used for assessing CHLI.  This parameter is equivalent to the
+     * Resilency parameter of 'p' as specified by MEF 10.2.1.
+     *
+     * Availability-consecutive-high-flr must be strictly less than
+     * availability-number-consecutive-intervals. If not, the count of high loss
+     * intervals over time, and the count of consecutive high loss levels, is disabled.
+     *
+     * The number range of 1 through 10 must be supported. The number range of 1
+     * through 1000 may be supported, but is not mandatory
+     * @return number of consecutive availability indicators
+     */
+    Short availabilityNumberConsecutiveHighFlr();
+
+    /**
+     * The list of Loss Measurement configuration threshold values for LM Performance Monitoring.
+     * The main purpose of the threshold configuration list is to configure
+     * threshold alarm notifications indicating that a specific performance metric
+     * is not being met
+     * @return A collection of Loss Measurement Thresholds
+     */
+    Collection<LossMeasurementThreshold> lossMeasurementThreshold();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementCreate}.
+     */
+    public interface LmCreateBuilder extends MeasCreateBaseBuilder {
+
+        LmCreateBuilder addToCountersEnabled(CounterOption counterOption);
+
+        LmCreateBuilder availabilityMeasurementInterval(
+                Duration availabilityMeasurementInterval);
+
+        LmCreateBuilder availabilityNumberConsecutiveFlrMeasurements(
+                Integer availabilityNumberConsecutiveFlrMeasurements);
+
+        LmCreateBuilder availabilityFlrThreshold(MilliPct availabilityFlrThreshold);
+
+        LmCreateBuilder availabilityNumberConsecutiveIntervals(
+                Short availabilityNumberConsecutiveIntervals) throws SoamConfigException;
+
+        LmCreateBuilder availabilityNumberConsecutiveHighFlr(
+                Short availabilityNumberConsecutiveHighFlr) throws SoamConfigException;
+
+        LmCreateBuilder addToLossMeasurementThreshold(
+                LossMeasurementThreshold lossMeasurementThreshold);
+
+        LossMeasurementCreate build();
+    }
+
+    /**
+     * Enumerated set of Loss Measurement types.
+     */
+    public enum LmType {
+        /**
+         * LMM SOAM PDU generated and received LMR responses tracked.
+         */
+        LMLMM,
+        /**
+         * SLM SOAM PDU generated and received SLR responses tracked.
+         */
+        LMSLM,
+        /**
+         * CCM SOAM PDU generated and received CCM PDUs tracked.
+         */
+        LMCCM;
+    }
+
+    /**
+     * Options for Counters that may be enabled.
+     */
+    public enum CounterOption {
+        FORWARD_TRANSMITTED_FRAMES,
+        FORWARD_RECEIVED_FRAMES,
+        FORWARD_MIN_FLR,
+        FORWARD_MAX_FLR,
+        FORWARD_AVERAGE_FLR,
+        BACKWARD_TRANSMITTED_FRAMES,
+        BACKWARD_RECEIVED_FRAMES,
+        BACKWARD_MIN_FLR,
+        BACKWARD_MAX_FLR,
+        BACKWARD_AVERAGE_FLR,
+        SOAM_PDUS_SENT,
+        SOAM_PDUS_RECEIVED,
+        AVAILABILITY_FORWARD_HIGH_LOSS,
+        AVAILABILITY_FORWARD_CONSECUTIVE_HIGH_LOSS,
+        AVAILABILITY_FORWARD_AVAILABLE,
+        AVAILABILITY_FORWARD_UNAVAILABLE,
+        AVAILABILILITY_FORWARD_MIN_FLR,
+        AVAILABILITY_FORWARD_MAX_FLR,
+        AVAILABILITY_FORWARD_AVERAGE_FLR,
+        AVAILABILITY_BACKWARD_HIGH_LOSS,
+        AVAILABILITY_BACKWARD_CONSECUTIVE_HIGH_LOSS,
+        AVAILABILITY_BACKWARD_AVAILABLE,
+        AVAILABLE_BACKWARD_UNAVAILABLE,
+        AVAILABLE_BACKWARD_MIN_FLR,
+        AVAILABLE_BACKWARD_MAX_FLR,
+        AVAILABLE_BACKWARD_AVERAGE_FLR,
+        MEASURED_STATS_FORWARD_MEASURED_FLR,
+        MEASURED_STATS_BACKWARD_MEASURED_FLR,
+        MEASURED_STATS_AVAILABILITY_FORWARD_STATUS,
+        MEASURED_STATS_AVAILABILITY_BACKWARD_STATUS;
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementEntry.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementEntry.java
new file mode 100644
index 0000000..fb0cecb
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementEntry.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * A model of Loss Measurement from ITU Y.1731 Chapter 8.2, MEF 17, MEF 36.1 and MEF 39.
+ *
+ * In this model Loss Measurements entries are returned as a collection in the
+ * MepEntry. In this way Loss Measurements are created by calling on the
+ * Create Loss Measurement function, passing in any arguments needed to
+ * configure it. The Loss Measurement is a result and not configured or
+ * persisted in ONOS, but instead is is passed on to some analytics system.
+ */
+public interface LossMeasurementEntry extends LossMeasurementCreate {
+    /**
+     * Ian id that uniquely identifies a scheduled measurement.
+     * It is automatically generated by the server on creation of a new measurement
+     * @return An LM id
+     */
+    SoamId lmId();
+
+    /**
+     * Contains the Frame Loss Ratio in the forward direction calculated by this MEP.
+     * from the last received SOAM PDU.
+     * The FLR value is a ratio that is expressed as a percent with a value of
+     * 0 (ratio 0.00) through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 per-cent
+     */
+    MilliPct measuredForwardFlr();
+
+    /**
+     * Contains the Frame Loss Ratio in the backward direction calculated by this MEP.
+     * from the last received SOAM PDU.
+     * The FLR value is a ratio that is expressed as a percent with a value of
+     * 0 (ratio 0.00) through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 per-cent
+     */
+    MilliPct measuredBackwardFlr();
+
+    /**
+     * The availability status (the outcome of the last availability indicator) in the forward direction.
+     * based upon the last received SOAM PDU
+     * @return enumerated availability value
+     */
+    AvailabilityType measuredAvailabilityForwardStatus();
+
+    /**
+     * The availability status (the outcome of the last availability indicator) in the backward direction.
+     * based upon the last received SOAM PDU
+     * @return enumerated availability value
+     */
+    AvailabilityType measuredAvailabilityBackwardStatus();
+
+    /**
+     * The time of the last transition between available and unavailable in the forward direction.
+     * If there have been no transitions since the Loss Measurement Session was
+     * started, this is set to 0
+     * @return The transition time
+     */
+    Instant measuredForwardLastTransitionTime();
+
+    /**
+     * The time of the last transition between available and unavailable in the backward direction.
+     * If there have been no transitions since the Loss Measurement Session was
+     * started, this is set to 0
+     * @return The transition time
+     */
+    Instant measuredBackwardLastTransitionTime();
+
+    /**
+     * The results for the current Measurement Interval in a SOAM Loss Measurement session.
+     * gathered during the interval indicated by measurement-interval
+     * @return An object with current measurements
+     */
+    LossMeasurementStatCurrent measurementCurrent();
+
+    /**
+     * The results for history Measurement Intervals in a SOAM Loss Measurement session.
+     * @return An object with historic measurements
+     */
+    Collection<LossMeasurementStatHistory> measurementHistories();
+
+    /**
+     * The current results for a SOAM Loss Measurement session for availability statistics.
+     * gathered during the interval indicated by availability-measurement-interval
+     * @return An object with current availability
+     */
+    LossAvailabilityStatCurrent availabilityCurrent();
+
+    /**
+     * The results for availability history Measurement Intervals in a SOAM Loss Measurement session.
+     * @return An object with historic availability
+     */
+    Collection<LossAvailabilityStatHistory> availabilityHistories();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementEntry}.
+     */
+    public interface LmEntryBuilder extends LmCreateBuilder {
+        LmEntryBuilder measuredForwardFlr(MilliPct measuredForwardFlr);
+
+        LmEntryBuilder measuredBackwardFlr(MilliPct measuredBackwardFlr);
+
+        LmEntryBuilder measuredAvailabilityForwardStatus(
+                AvailabilityType measuredAvailabilityForwardStatus);
+
+        LmEntryBuilder measuredAvailabilityBackwardStatus(
+                AvailabilityType measuredAvailabilityBackwardStatus);
+
+        LmEntryBuilder measuredForwardLastTransitionTime(
+                Instant measuredForwardLastTransitionTime);
+
+        LmEntryBuilder measuredBackwardLastTransitionTime(
+                Instant measuredBackwardLastTransitionTime);
+
+        LmEntryBuilder measurementCurrent(
+                LossMeasurementStatCurrent measurementCurrent);
+
+        LmEntryBuilder addToMeasurementHistories(
+                LossMeasurementStatHistory history);
+
+        LmEntryBuilder availabilityCurrent(
+                LossAvailabilityStatCurrent availabilityCurrent);
+
+        LmEntryBuilder addToAvailabilityHistories(LossAvailabilityStatHistory history);
+
+        LossMeasurementEntry build();
+    }
+
+    /**
+     * Options for Availability test types.
+     */
+    public enum AvailabilityType {
+        AVAILABLE,
+        UNAVAILABLE,
+        UNKNOWN;
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStat.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStat.java
new file mode 100644
index 0000000..f61aab5
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStat.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Duration;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+
+/**
+ * Abstract base interface for the creation of Loss Measurement Stat.
+ * This is the base for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatHistory}
+ * and {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatCurrent}
+ */
+public interface LossMeasurementStat {
+    /**
+     * The time that the current Measurement Interval has been running.
+     * @return A java Duration
+     */
+    Duration elapsedTime();
+
+    /**
+     * The suspect flag for the current measurement interval in which the notification was generated.
+     * reference MEF-SOAM-PM-MIB.mefSoamPmNotificationObjSuspect";
+     * @return true if the measurement might include an error
+     */
+    boolean suspectStatus();
+
+    /**
+     * The number of frames transmitted in the forward direction by this MEP.
+     * For a PM Session of types lmm or ccm this includes Ethernet Service Frames
+     * and SOAM PDUs that are in a higher MEG level only.
+     * For a PM Session of type slm this includes the count of SOAM ETH-SLM frames only
+     * @return The number of frames
+     */
+    Long forwardTransmittedFrames();
+
+    /**
+     * The number of frames received in the forward direction by this MEP.
+     * For a PM Session of types lmm or ccm this includes Ethernet
+     * Service Frames and SOAM PDUs that are in a higher MEG level only.
+     * For a PM Session of type slm this includes the count of SOAM ETH-SLM frames only
+     * @return The number of frames received
+     */
+    Long forwardReceivedFrames();
+
+    /**
+     * The minimum one-way frame loss ratio in the forward direction calculated by this MEP for this Interval.
+     * The FLR value is a ratio that is expressed as a percent with a value of
+     * 0 (ratio 0.00) through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardMinFrameLossRatio();
+
+    /**
+     * The maximum one-way frame loss ratio in the forward direction calculated by this MEP for this Interval.
+     * The FLR value is a ratio that is expressed as a percent with a value of
+     * 0 (ratio 0.00) through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardMaxFrameLossRatio();
+
+    /**
+     * The average one-way frame loss ratio in the forward direction calculated by this MEP for this Interval.
+     * The FLR value is a ratio that is expressed as a percent with a value of
+     * 0 (ratio 0.00) through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardAverageFrameLossRatio();
+
+    /**
+     * The number of frames transmitted in the backward direction by this MEP.
+     * For a PM Session of type lmm or ccm this includes Ethernet Service Frames
+     * and SOAM PDUs that are in a higher MEG level only.
+     * For a PM Session of type slm this includes the count of SOAM ETH-SLM frames only
+     * @return The number of frames
+     */
+    Long backwardTransmittedFrames();
+
+    /**
+     * The number of frames received in the backward direction by this MEP.
+     * For a PM Session of type lmm this includes Ethernet Service Frames and
+     * SOAM PDUs that are in a higher MEG level only.
+     * For a PM Session of type slm this includes the count of SOAM ETH-SLM frames only
+     * @return The number of frames
+     */
+    Long backwardReceivedFrames();
+
+    /**
+     * The minimum one-way frame loss ratio in the backward direction.
+     * calculated by this MEP for this Measurement Interval. The FLR value is a
+     * ratio that is expressed as a percent with a value of 0 (ratio 0.00)
+     * through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardMinFrameLossRatio();
+
+    /**
+     * The maximum one-way frame loss ratio in the backward direction.
+     * calculated by this MEP for this Measurement Interval. The FLR value is a
+     * ratio that is expressed as a percent with a value of 0 (ratio 0.00)
+     * through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardMaxFrameLossRatio();
+
+    /**
+     * The average one-way frame loss ratio in the backward direction.
+     * calculated by this MEP for this Measurement Interval. The FLR value is a
+     * ratio that is expressed as a percent with a value of 0 (ratio 0.00)
+     * through 100000 (ratio 1.00).
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardAverageFrameLossRatio();
+
+    /**
+     * The count of the number of SOAM PDUs sent during this Measurement Interval.
+     * This object applies when type is lmm, slm or ccm. It indicates the number
+     * of LMM, CCM, or SLM SOAM frames transmitted
+     * @return the number of SOAM PDUs sent
+     */
+    Long soamPdusSent();
+
+    /**
+     * The count of the number of SOAM PDUs PDUs received in this Measurement Interval.
+     * This object applies when type is lmm, slm, or ccm. This object indicates
+     * the number of LMR, CCM, or SLR SOAM frames received
+     * @return the number of SOAM PDUs PDUs received
+     */
+    Long soamPdusReceived();
+
+    /**
+     * Base interface for builders of {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStat}.
+     */
+    interface LmStatBuilder {
+        LmStatBuilder forwardTransmittedFrames(Long forwardTransmittedFrames);
+
+        LmStatBuilder forwardReceivedFrames(Long forwardReceivedFrames);
+
+        LmStatBuilder forwardMinFrameLossRatio(MilliPct forwardMinFrameLossRatio);
+
+        LmStatBuilder forwardMaxFrameLossRatio(MilliPct forwardMaxFrameLossRatio);
+
+        LmStatBuilder forwardAverageFrameLossRatio(MilliPct forwardAverageFrameLossRatio);
+
+        LmStatBuilder backwardTransmittedFrames(Long backwardTransmittedFrames);
+
+        LmStatBuilder backwardReceivedFrames(Long backwardReceivedFrames);
+
+        LmStatBuilder backwardMinFrameLossRatio(MilliPct backwardMinFrameLossRatio);
+
+        LmStatBuilder backwardMaxFrameLossRatio(MilliPct backwardMaxFrameLossRatio);
+
+        LmStatBuilder backwardAverageFrameLossRatio(MilliPct backwardAverageFrameLossRatio);
+
+        LmStatBuilder soamPdusSent(Long soamPdusSent);
+
+        LmStatBuilder soamPdusReceived(Long soamPdusReceived);
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatCurrent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatCurrent.java
new file mode 100644
index 0000000..c5b2423
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatCurrent.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+
+/**
+ * Object for representing Loss Availability Stats Current.
+ * Extends {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStat}
+ */
+public interface LossMeasurementStatCurrent extends LossMeasurementStat {
+    /**
+     * The time that the current Measurement Interval started.
+     * @return The start time as a java Instant
+     */
+    Instant startTime();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatCurrent}.
+     */
+    public interface LmStatCurrentBuilder extends LmStatBuilder {
+        LossMeasurementStatCurrent build();
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatHistory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatHistory.java
new file mode 100644
index 0000000..90c7a5f
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementStatHistory.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.time.Instant;
+
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * Object for representing Loss Measurement Stats History.
+ * Extends {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStat}
+ */
+public interface LossMeasurementStatHistory extends LossMeasurementStat {
+    /**
+     * The identifier of the historic measurement.
+     * @return The id
+     */
+    SoamId historyStatsId();
+
+    /**
+     * The time that the historic Measurement Interval ended.
+     * @return A java Instant
+     */
+    Instant endTime();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementStatHistory}.
+     */
+    public interface LmStatHistoryBuilder extends LmStatBuilder {
+        LossMeasurementStatHistory build();
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementThreshold.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementThreshold.java
new file mode 100644
index 0000000..1624204
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/LossMeasurementThreshold.java
@@ -0,0 +1,209 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
+
+import java.util.Collection;
+
+import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
+import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
+
+/**
+ * Object to support the setting of Loss Measurement Thresholds.
+ *
+ * The main purpose of the threshold configuration is to configure threshold
+ * alarm notifications indicating that a specific performance metric is not being met
+ */
+public interface LossMeasurementThreshold {
+    /**
+     * The index of the threshold number for the specific LM threshold entry.
+     * An index value of '1' needs to be supported. Other index values can also be supported
+     * @return The threshold Id
+     */
+    SoamId thresholdId();
+
+    /**
+     * A vector of bits that indicates the type of SOAM LM thresholds notifications that are enabled.
+     * A present but enables the specific SOAM LM threshold notification and
+     * when the specific counter is enabled and the threshold is crossed a
+     * notification is generated.
+     * A not present bit disables the specific SOAM LM threshold notification.
+     * If a particular SOAM LM threshold is not supported the BIT value is not present
+     * @return A collection of bit options
+     */
+    Collection<ThresholdOption> thresholds();
+
+    /**
+     * The measured forward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct measuredFlrForward();
+
+    /**
+     * The maximum forward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct maxFlrForward();
+
+    /**
+     * The average forward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct averageFlrForward();
+
+    /**
+     * The measured backward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct measuredFlrBackward();
+
+    /**
+     * The maximum backward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct maxFlrBackward();
+
+    /**
+     * The average backward frame loss ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct averageFlrBackward();
+
+    /**
+     * The forward high loss threshold value.
+     * that will be used to determine if a threshold notification is generated.
+     * @return The threshold value
+     */
+    Long forwardHighLoss();
+
+    /**
+     * The consecutive forward high loss threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return The threshold value
+     */
+    Long forwardConsecutiveHighLoss();
+
+    /**
+     * The backward high loss threshold value.
+     * that will be used to determine if a threshold notification is generated.
+     * @return The threshold value
+     */
+    Long backwardHighLoss();
+
+    /**
+     * The consecutive backward high loss threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return The threshold value
+     */
+    Long backwardConsecutiveHighLoss();
+
+    /**
+     * The forward unavailability threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return The threshold value
+     */
+    Long forwardUnavailableCount();
+
+    /**
+     * The forward availability/total time ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * if the ratio drops below the configured value.
+     * The ratio value is expressed as a percent with a value of 0 (ratio 0.00)
+     * through 100000 (ratio 1.00)
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct forwardAvailableRatio();
+
+    /**
+     * The backward unavailability threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * @return The threshold value
+     */
+    Long backwardUnavailableCount();
+
+    /**
+     * The backward availability/total time ratio threshold value.
+     * that will be used to determine if a threshold notification is generated
+     * if the ratio drops below the configured value.
+     * The ratio value is expressed as a percent with a value of 0 (ratio 0.00)
+     * through 100000 (ratio 1.00)
+     * @return Units are in milli-percent, where 1 indicates 0.001 percent
+     */
+    MilliPct backwardAvailableRatio();
+
+    /**
+     * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossMeasurementThreshold}.
+     */
+    public interface LmThresholdBuilder {
+
+        LmThresholdBuilder addToThreshold(ThresholdOption threshold);
+
+        LmThresholdBuilder measuredFlrForward(MilliPct measuredFlrForward);
+
+        LmThresholdBuilder maxFlrForward(MilliPct maxFlrForward);
+
+        LmThresholdBuilder averageFlrForward(MilliPct averageFlrForward);
+
+        LmThresholdBuilder measuredFlrBackward(MilliPct measuredFlrBackward);
+
+        LmThresholdBuilder maxFlrBackward(MilliPct maxFlrBackward);
+
+        LmThresholdBuilder averageFlrBackward(MilliPct averageFlrBackward);
+
+        LmThresholdBuilder forwardHighLoss(Long forwardHighLoss);
+
+        LmThresholdBuilder forwardConsecutiveHighLoss(Long forwardConsecutiveHighLoss);
+
+        LmThresholdBuilder backwardHighLoss(Long backwardHighLoss);
+
+        LmThresholdBuilder backwardConsecutiveHighLoss(Long backwardConsecutiveHighLoss);
+
+        LmThresholdBuilder forwardUnavailableCount(Long forwardUnavailableCount);
+
+        LmThresholdBuilder forwardAvailableRatio(MilliPct forwardAvailableRatio);
+
+        LmThresholdBuilder backwardUnavailableCount(Long backwardUnavailableCount);
+
+        LmThresholdBuilder backwardAvailableRatio(MilliPct backwardAvailableRatio);
+
+        LossMeasurementThreshold build();
+    }
+
+    /**
+     * Set of enumerated threshold options.
+     */
+    public enum ThresholdOption {
+        MEASURED_FLR_FORWARD,
+        MAX_FLR_FORWARD,
+        AVERAGE_FLR_FORWARD,
+        MEASURED_FLR_BACKWARD,
+        MAX_FLR_BACKWARD,
+        AVERAGE_FLR_BACKWARD,
+        FORWARD_HIGH_LOSS,
+        FORWARD_CONSECUTIVE_HIGH_LOSS,
+        BACKWARD_HIGH_LOSS,
+        BACKWARD_CONSECUTIVE_HIGH_LOSS,
+        FORWARD_UNAVAILABLE_COUNT,
+        FORWARD_AVAILABLE_RATIO,
+        BACKWARD_UNAVAILABLE_COUNT,
+        BACKWARD_AVAILABLE_RATIO;
+    }
+}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/package-info.java b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/package-info.java
new file mode 100644
index 0000000..909113a
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/l2monitoring/soam/loss/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * Implementation of Service Operation and Maintenance related to Frame loss measurement.
+ *
+ * From ITU Y.1731 (ETH-DM) and MEF 17 Frame Delay Performance and Frame Delay Variation Performance
+ * MEF 36.1 Service OAM SNMP MIB for Performance Monitoring,  MEF 39 Service OAM Performance Monitoring YANG Module
+ */
+package org.onosproject.incubator.net.l2monitoring.soam.loss;
\ No newline at end of file