DeviceReference
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
DeviceReference
는 다음 식별자 유형 중 하나를 사용하여 device 인수를 메서드에 제공할 수 있게 하는 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 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],["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"],null,[]]