/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * 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.
 */

syntax = "proto2";

package devicelockcontroller;

option java_package = "com.android.devicelockcontroller.proto";
option java_multiple_files = true;

// A service for finalizing Device Lock program enrollment. For example:
// 1. In device financing program, the device is fully paid-off.
// 2. In device subsidy program, subsidy of the device is done.
service DeviceLockFinalizeService {
  // Reports that a device completed a Device Lock program.
  rpc ReportDeviceProgramComplete(ReportDeviceProgramCompleteRequest)
      returns (ReportDeviceProgramCompleteResponse) { }
}

// Request to report that a device completed a Device Lock program.
message ReportDeviceProgramCompleteRequest {
  // The device identifier that is registered with the Device Lock server
  // obtained from the Device Lock Check-in service.
  optional string registered_device_identifier = 1;
  // The key attestation leaf certificate
  optional bytes leaf_certificate = 2;
}

message ReportDeviceProgramCompleteResponse {}