DeviceReference
DeviceReference
는 다음 식별자 유형 중 하나를 사용하여 메서드에 기기 인수를 제공할 수 있는 API 추상화입니다.
- 숫자 API 리소스 ID입니다.
- 제조된 기기에 속한 실제 하드웨어 ID(예: IMEI 번호)
기기에서 작동하는 메서드는 호출자에게 더 유연하므로 DeviceReference
를 매개변수 유형으로 사용합니다. 기기 식별자에 관한 자세한 내용은 식별자를 참고하세요.
JSON 표현 |
{
// Union field device can be only one of the following:
"deviceId": string,
"deviceIdentifier": {
object (DeviceIdentifier )
}
// End of list of possible types for union field device .
} |
필드 |
통합 필드 device . 필수 항목입니다. 기기의 고유 식별자입니다. device 은 다음 중 하나여야 합니다. |
deviceId |
string (int64 format)
기기의 ID입니다.
|
deviceIdentifier |
object (DeviceIdentifier )
기기의 하드웨어 ID입니다.
|
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-08(UTC)
[null,null,["최종 업데이트: 2024-11-08(UTC)"],[[["`DeviceReference` allows methods to accept a device argument using either a numeric API resource ID or real-world hardware IDs."],["Methods use `DeviceReference` as a parameter for flexibility in identifying devices."],["The `device` field in the JSON representation is a union field, accepting either a `deviceId` or `deviceIdentifier`."],["`deviceId` is a string that represents the unique ID of the device, and `deviceIdentifier` refers to an object containing the hardware IDs."]]],["A `DeviceReference` is used as a device argument in methods, accepting either a numeric API resource ID (`deviceId`) or real-world hardware IDs (`deviceIdentifier`) like IMEI. The JSON representation uses a union field named `device` that contains either a `deviceId` string (int64 format) or a `deviceIdentifier` object, which holds the device's hardware IDs. Methods use this type for increased flexibility in identifying devices.\n"]]