/*
 * Copyright 2019 AT&T Intellectual Property
 * Copyright 2019 Nokia
 *
 * 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.
 */

/*
 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
 * platform project (RICP).
 */


syntax = "proto3";
package entities;
option go_package = "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib/entities";

enum ConnectionStatus {
  UNKNOWN_CONNECTION_STATUS = 0;
  CONNECTED = 1;
  DISCONNECTED = 2;
  CONNECTED_SETUP_FAILED = 3;
  CONNECTING = 4;
  SHUTTING_DOWN = 5;
  SHUT_DOWN = 6;
  UNDER_RESET = 7;
}

message GlobalNbId{
  string plmn_id = 1;
  string nb_id = 2;
}

message NbIdentity{
  string inventory_name = 1;
  GlobalNbId global_nb_id = 2;
  ConnectionStatus connection_status = 3;
  int64 health_check_timestamp_sent = 4;
  int64 health_check_timestamp_received = 5;
}
