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 LogLevel {
    // Logging verbosity level
    enum Types {
        DEBUG = 0;
        INFO = 1;
        WARNING = 2;
        ERROR = 3;
        CRITICAL = 4;
        FATAL = 5;
    }
}

message Logging {
    common.LogLevel.Types level = 1;
    string package_name = 2;
    string component_name = 3;
}

// For GetLogLevels(), select component to query
message LoggingComponent {
    string component_name = 1;
}

// For returning multiple log levels
message Loggings {
	repeated Logging items = 1;
}

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;
}