/*
 * Copyright 2019 AT&T Intellectual Property
 * Copyright 2019 Nokia
 * Copyright 2023 Capgemini
 *
 * 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;
import "gnb.proto";
import "enb.proto";
import "x2_setup_failure_response.proto";
import "nb_identity.proto";
option go_package = "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib/entities";

message NodebInfo {
  string ran_name = 1;
  string ip = 2;
  uint32 port = 3;
  E2ApplicationProtocol e2_application_protocol = 4;
  ConnectionStatus connection_status = 5;
  GlobalNbId global_nb_id = 6;
  Node.Type node_type = 7;
  oneof configuration {
    Enb enb = 8;
    Gnb gnb = 9;
  }
  Failure.Type failure_type = 10;
  SetupFailure setup_failure = 11;
  string associated_e2t_instance_address = 12;
  bool setup_from_network = 13;
  uint64 status_update_time_stamp = 14;
  string gnb_node_type = 15;
  string cu_up_id = 16;
  string du_id = 17;
}

enum E2ApplicationProtocol {
  UNKNOWN_E2_APPLICATION_PROTOCOL = 0;
  X2_SETUP_REQUEST = 1;
  ENDC_X2_SETUP_REQUEST = 2;
}


message Node {
  enum Type {
    UNKNOWN = 0;
    ENB = 1;
    GNB = 2;
  }
}

message Failure {
  enum Type {
    UNKNOWN_TYPE = 0;
    X2_SETUP_FAILURE = 1;
    ENDC_X2_SETUP_FAILURE = 2;
  }
}
