[[["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."],[],[],null,["# Google Cloud OsConfig V1 Client - Class LabelSet (2.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.0 (latest)](/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignment.LabelSet)\n- [2.0.5](/php/docs/reference/cloud-osconfig/2.0.5/V1.OSPolicyAssignment.LabelSet)\n- [1.3.5](/php/docs/reference/cloud-osconfig/1.3.5/V1.OSPolicyAssignment.LabelSet)\n- [1.2.2](/php/docs/reference/cloud-osconfig/1.2.2/V1.OSPolicyAssignment.LabelSet)\n- [1.1.1](/php/docs/reference/cloud-osconfig/1.1.1/V1.OSPolicyAssignment.LabelSet)\n- [1.0.5](/php/docs/reference/cloud-osconfig/1.0.5/V1.OSPolicyAssignment.LabelSet) \nReference documentation and code samples for the Google Cloud OsConfig V1 Client class LabelSet.\n\nMessage representing label set.\n\n- A label is a key value pair set for a VM.\n- A LabelSet is a set of labels.\n- Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet.\n- Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.\n\nGenerated from protobuf message `google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OsConfig \\\\ V1 \\\\ OSPolicyAssignment\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getLabels\n\nLabels are identified by key/value pairs in this map.\n\nA VM should contain all the key/value pairs specified in this\nmap to be selected.\n\n### setLabels\n\nLabels are identified by key/value pairs in this map.\n\nA VM should contain all the key/value pairs specified in this\nmap to be selected."]]