public sealed class OSPolicy.Types.Resource.Types.PackageResource : IMessage<OSPolicy.Types.Resource.Types.PackageResource>, IEquatable<OSPolicy.Types.Resource.Types.PackageResource>, IDeepCloneable<OSPolicy.Types.Resource.Types.PackageResource>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud OS Config v1alpha API class OSPolicy.Types.Resource.Types.PackageResource.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOSPolicy.Types.Resource.Types.PackageResource\u003c/code\u003e class is a part of the Google Cloud OS Config v1alpha API and is designed for managing system packages.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, enabling it to interact within the Google Protocol Buffers framework.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePackageResource\u003c/code\u003e supports various package management systems, including Apt, Deb, GooGet, MSI, Rpm, Yum, and Zypper, allowing it to handle a wide variety of package types.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDesiredState\u003c/code\u003e property within \u003ccode\u003ePackageResource\u003c/code\u003e dictates the intended state for a managed package, which the OS Config agent should enforce.\u003c/p\u003e\n"],["\u003cp\u003eThe class features constructors for creating new instances of \u003ccode\u003ePackageResource\u003c/code\u003e, including one that copies from an existing \u003ccode\u003ePackageResource\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google Cloud OS Config v1alpha API - Class OSPolicy.Types.Resource.Types.PackageResource (2.0.0-alpha06)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-alpha06 (latest)](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource)\n- [2.0.0-alpha05](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/2.0.0-alpha05/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource)\n- [1.0.0-alpha04](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/1.0.0-alpha04/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource) \n\n public sealed class OSPolicy.Types.Resource.Types.PackageResource : IMessage\u003cOSPolicy.Types.Resource.Types.PackageResource\u003e, IEquatable\u003cOSPolicy.Types.Resource.Types.PackageResource\u003e, IDeepCloneable\u003cOSPolicy.Types.Resource.Types.PackageResource\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud OS Config v1alpha API class OSPolicy.Types.Resource.Types.PackageResource.\n\nA resource that manages a system package. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OSPolicy.Types.Resource.Types.PackageResource \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[Resource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types)[PackageResource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[Resource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types)[PackageResource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OSPolicy](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types)[Resource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource)[Types](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types)[PackageResource](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha.OSPolicy.Types.Resource.Types.PackageResource), [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.OsConfig.V1Alpha](/dotnet/docs/reference/Google.Cloud.OsConfig.V1Alpha/latest/Google.Cloud.OsConfig.V1Alpha)\n\nAssembly\n--------\n\nGoogle.Cloud.OsConfig.V1Alpha.dll\n\nConstructors\n------------\n\n### PackageResource()\n\n public PackageResource()\n\n### PackageResource(PackageResource)\n\n public PackageResource(OSPolicy.Types.Resource.Types.PackageResource other)\n\nProperties\n----------\n\n### Apt\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.APT Apt { get; set; }\n\nA package managed by Apt.\n\n### Deb\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.Deb Deb { get; set; }\n\nA deb package file.\n\n### DesiredState\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.DesiredState DesiredState { get; set; }\n\nRequired. The desired state the agent should maintain for this package.\n\n### Googet\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.GooGet Googet { get; set; }\n\nA package managed by GooGet.\n\n### Msi\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.MSI Msi { get; set; }\n\nAn MSI package.\n\n### Rpm\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.RPM Rpm { get; set; }\n\nAn rpm package file.\n\n### SystemPackageCase\n\n public OSPolicy.Types.Resource.Types.PackageResource.SystemPackageOneofCase SystemPackageCase { get; }\n\n### Yum\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.YUM Yum { get; set; }\n\nA package managed by YUM.\n\n### Zypper\n\n public OSPolicy.Types.Resource.Types.PackageResource.Types.Zypper Zypper { get; set; }\n\nA package managed by Zypper."]]