/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you 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.
 *
 */

syntax = "proto3";

option java_multiple_files = true;
package org.apache.custos.core.user.management.api;

import "UserProfile.proto";
import "IamAdmin.proto";


message UserProfileRequest {
  org.apache.custos.core.user.profile.api.UserProfile user_profile = 1;
  string client_id = 2;
  int64 tenant_id = 3;
  string access_token = 4;
  string client_secret = 5;
  string performed_by = 6;
  int32 limit = 7;
  int32 offset = 8;
}

message GetUserRequest {
  string username = 1;
  org.apache.custos.core.iam.api.UserSearchRequest user_search_request = 2;
}

message GetUsersRequest {
  int64 tenant_id = 1;
  string email = 2;
  string username = 3;
  int32 offset = 4;
  int32 limit = 5;
  string search = 6;
  string iam_client_id = 7;
  string iam_client_secret = 8;
}

message ResetPassword {
  int64 tenant_id = 1;
  string access_token = 2;
  string username = 3;
  string password = 4;
  string iam_client_id = 5;
  string iam_client_secret = 6;
}

message ResetPasswordRequest {
  ResetPassword password_metadata = 1;
}

message LinkUserProfileRequest {
  string current_username = 1;
  string previous_username = 2;
  repeated string linking_attributes = 3;
  int64 tenantId = 4;
  string iam_client_id = 5;
  string iam_client_secret = 6;
  string access_token = 7;
  string performed_by = 8;
}

message SynchronizeUserDBRequest {
  int64 tenant_id = 2;
  string client_id = 4;
}
