syntax = "proto3";

option go_package = "github.com/opencord/voltha-protos/v3/go/common";

package common;

option java_package = "org.opencord.voltha";

// Convey a resource identifier
message ID {
    string id = 1;
}

// Represents a list of IDs
message IDs {
    repeated ID items = 1;
}

enum TestModeKeys {
    api_test=0;
}

message AdminState {
    // Administrative State
    enum Types {

        // The administrative state of the device is unknown
        UNKNOWN = 0;

        // The device is pre-provisioned into Voltha, but not contacted by it
        PREPROVISIONED = 1;

        // The device is enabled for activation and operation
        ENABLED = 2;

        // The device is disabled and shall not perform its intended forwarding
        // functions other than being available for re-activation.
        DISABLED = 3;

        // The device is in the state of image download
        DOWNLOADING_IMAGE = 4;

        // The device is marked to be deleted
        DELETED = 5;
    }
}

message OperStatus {
    // Operational Status
    enum Types {

        // The status of the device is unknown at this point
        UNKNOWN = 0;

        // The device has been discovered, but not yet activated
        DISCOVERED = 1;

        // The device is being activated (booted, rebooted, upgraded, etc.)
        ACTIVATING = 2;

        // Service impacting tests are being conducted
        TESTING = 3;

        // The device is up and active
        ACTIVE = 4;

        // The device has failed and cannot fulfill its intended role
        FAILED = 5;
    }
}

message ConnectStatus {
    // Connectivity Status
    enum Types {

        // The device connectivity status is unknown
        UNKNOWN = 0;

        // The device cannot be reached by Voltha
        UNREACHABLE = 1;

        // There is live communication between device and Voltha
        REACHABLE = 2;
    }
}

message OperationResp {
    enum OperationReturnCode {
        OPERATION_SUCCESS = 0;
        OPERATION_FAILURE = 1;
        OPERATION_UNSUPPORTED = 2;
    }
    // Return code
    OperationReturnCode code = 1;

    // Additional Info
    string additional_info = 2;
}
message ValueType {
        enum Type {
                EMPTY = 0;
                DISTANCE = 1;
        }
}
message ValueSpecifier {
	string id = 1;
	ValueType.Type value = 2;
}

message ReturnValues {
        uint32  Set = 1;       // Specifies what values are
                               // set/valid in return

        uint32 Unsupported = 2; // Specifies requested values not
                                // supported by the device

        uint32 Error  = 3;      // Specifies requested values not
                                // fetched because of error

        uint32 Distance = 4;    // Value of distance Set includes
                                // DISTANCE

}
