public sealed class PublicKeyCredential : IMessage<PublicKeyCredential>, IEquatable<PublicKeyCredential>, IDeepCloneable<PublicKeyCredential>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud IoT v1 API class PublicKeyCredential.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003ePublicKeyCredential\u003c/code\u003e class is 2.2.0, which is part of the Cloud IoT v1 API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePublicKeyCredential\u003c/code\u003e is a class that represents a public key format and its associated data, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors, \u003ccode\u003ePublicKeyCredential()\u003c/code\u003e and \u003ccode\u003ePublicKeyCredential(PublicKeyCredential other)\u003c/code\u003e, the latter allowing the creation of an object based on another existing object of the same type.\u003c/p\u003e\n"],["\u003cp\u003eIt contains two properties, \u003ccode\u003eFormat\u003c/code\u003e which represents the format of the key and \u003ccode\u003eKey\u003c/code\u003e, which holds the data for the key, each with their own associated types.\u003c/p\u003e\n"],["\u003cp\u003eThere are six different versions available of this library, ranging from version 1.0.0 to 2.2.0, each with its own link to its associated documentation.\u003c/p\u003e\n"]]],[],null,["# Cloud IoT v1 API - Class PublicKeyCredential (2.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.PublicKeyCredential)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.PublicKeyCredential)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.PublicKeyCredential)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.PublicKeyCredential)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.PublicKeyCredential)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.PublicKeyCredential) \n\n public sealed class PublicKeyCredential : IMessage\u003cPublicKeyCredential\u003e, IEquatable\u003cPublicKeyCredential\u003e, IDeepCloneable\u003cPublicKeyCredential\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud IoT v1 API class PublicKeyCredential.\n\nA public key format and data. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PublicKeyCredential \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PublicKeyCredential](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.PublicKeyCredential), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PublicKeyCredential](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.PublicKeyCredential), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PublicKeyCredential](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.PublicKeyCredential), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Iot.V1](/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Iot.V1.dll\n\nConstructors\n------------\n\n### PublicKeyCredential()\n\n public PublicKeyCredential()\n\n### PublicKeyCredential(PublicKeyCredential)\n\n public PublicKeyCredential(PublicKeyCredential other)\n\nProperties\n----------\n\n### Format\n\n public PublicKeyFormat Format { get; set; }\n\nThe format of the key.\n\n### Key\n\n public string Key { get; set; }\n\nThe key data."]]